Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Rows.Find question
Is there a way to Use Rows.Find to find the row with 3
different values? Something like: Rows.Find (NewWidth) & (NewLength) & (NewThick)...? NewWidth will always be in Column B NewLength will always be in Column C NewThick will always be in Column D Then I need to select the cell in Column A of the row that is found. Sorry for the re-post in this, just hit a major snag that I need to get through. Thanks for all your help, Todd |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Rows.Find question
I don't use .Find very often but I don't think that will be the best wa
to go. If it is not a large amount of data, you can just use a loop. Code ------------------- Sub test() Dim i As Long Dim NewWidth As Single Dim NewHeight As Single Dim NewDepth As Single NewWidth = 3.5 NewHeight = 10 NewDepth = 0.25 For i = 1 To Range("A65536").End(xlUp).Row '1 to last used cell in Col A If Range("B" & i) = NewWidth And _ Range("C" & i) = NewLength And _ Range("D" & i) = NewDepth Then Range("A" & i).Select Exit For End If Next End Su ------------------- -- Message posted from http://www.ExcelForum.com |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Rows.Find question
Worked great...Thanks a million!
-----Original Message----- I don't use .Find very often but I don't think that will be the best way to go. If it is not a large amount of data, you can just use a loop. Code: -------------------- Sub test() Dim i As Long Dim NewWidth As Single Dim NewHeight As Single Dim NewDepth As Single NewWidth = 3.5 NewHeight = 10 NewDepth = 0.25 For i = 1 To Range("A65536").End(xlUp).Row '1 to last used cell in Col A If Range("B" & i) = NewWidth And _ Range("C" & i) = NewLength And _ Range("D" & i) = NewDepth Then Range("A" & i).Select Exit For End If Next End Sub -------------------- K --- Message posted from http://www.ExcelForum.com/ . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Rows.Find question
One minor correction
Range("C" & i) = NewLength And _ Range("C" & i) = NewHeight And _ -- Don Guillett SalesAid Software "kkknie " wrote in message ... I don't use .Find very often but I don't think that will be the best way to go. If it is not a large amount of data, you can just use a loop. Code: -------------------- Sub test() Dim i As Long Dim NewWidth As Single Dim NewHeight As Single Dim NewDepth As Single NewWidth = 3.5 NewHeight = 10 NewDepth = 0.25 For i = 1 To Range("A65536").End(xlUp).Row '1 to last used cell in Col A If Range("B" & i) = NewWidth And _ Range("C" & i) = NewLength And _ Range("D" & i) = NewDepth Then Range("A" & i).Select Exit For End If Next End Sub -------------------- K --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I find my question? | Excel Discussion (Misc queries) | |||
how to find my question | Excel Discussion (Misc queries) | |||
Find & replace question.....I believe | Excel Discussion (Misc queries) | |||
VBA .Find question | Excel Discussion (Misc queries) | |||
Find Method question | Excel Programming |