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 |
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 |
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/ . |
All times are GMT +1. The time now is 05:05 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com