Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If the Dim "sUserPart" has no match in column A, how do I capture that? I
would like to prompt the user with a MsgBox. Everything I have come up with itterates thru all the cells. ![]() '====== With Sheets("Part Number") Sh1LastRow = .Cells(Rows.Count, "A").End(xlUp).Row Set Sh1Range = .Range("A1:A" & Sh1LastRow) End With For Each Sh1Cell In Sh1Range If Sh1Cell.Value = sUserPart Then MsgBox "do some stuff here" Else MsgBox "Not found!" 'loops thru all cells in range? End If '====== -- Regards VBA.Noob.Confused XP Pro Office 2007 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I enter formula sum(range+range)*0.15 sumif(range=3) | Excel Discussion (Misc queries) | |||
Excel Addin:Setting the range to the Excel.Range object range prop | Excel Worksheet Functions | |||
Range Question / error 1004: method Range of object Worksheet has failed | Excel Programming | |||
Range.Find returns cell outside of range when range set to single cell | Excel Programming | |||
how to? set my range= my UDF argument (range vs. value in range) [advanced?] | Excel Programming |