I'm new to these macros, I need to know the correct commands.
So from sheet "calculation" in cell C4, i want to search for data in a sheet called "round" then take the data in the cell which is offset (0,1) and return it to C4. Any idea how to do that? thanks.
Thanks
Any ideas? All ive gotten it to do so far is return True in the cell next to the found data. Haha.
2007-11-05
05:29:37
·
3 answers
·
asked by
billgoats79
5
in
Computers & Internet
➔ Programming & Design
I cant use that function because there are multiple columns to search in. I've managed to get something working but it seems to grab any instance of the numbers rather than just cells with that EXACT number as the value.
Sub get_51_abundance()
Sheets("Calculation").Activate
Range("C4").Activate
Sheets("Round").Select
Range("A1").Select
Cells.Find(What:="51", After:=[A3], LookIn:=xlValues, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=True).Select
ActiveCell.Offset(0, 1).Range("A1").Select
Selection.Copy
Sheets("Calculation").Activate
Range("C4").Activate
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
End Sub
I think just a minor change to one line might do it.
2007-11-06
01:29:37 ·
update #1
I got it, _xlPart in the search should have been _xlWhole. Thanks for the help though.
2007-11-06
01:56:34 ·
update #2