Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
IF Statement Help
Hi,
Try manipulating this, I think it does the reverse of what you want so you can take the "not" out if so, explain more if not. Range("A3").Select MyValue = Selection.Value lastrow = Cells(Rows.Count, "A").End(xlUp).Row For Each cl In Range("A1:a" & lastrow) If Not (cl = "Myvalue") Then Selection.EntireRow.Select End If Next Regards Duncan bodhisatvaofboogie wrote: Range("A3").Select MyValue = Selection lastrow = Cells(Rows.Count, "A").End(xlUp).Row Set cell = Cells(a, "A") If Not (cell = "Myvalue") Then Selection.EntireRow.Select End If This statement Is just not working. Where am I going wrong? It is supposed to do the following: Select a specific cell -- Whatever that value is, set it to Myvalue. THEN search through the column ("A:A") and if the cell is not equal to that Myvalue, then select the entire row. Make sense? THANKS FOR THE HELP!!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
IF statement inside a SUMIF statement.... or alternative method | Excel Worksheet Functions | |||
Reconcile Bank statement & Credit card statement & accounting data | Excel Worksheet Functions | |||
Embedding an OR statement in an IF statement efficiently | Excel Discussion (Misc queries) | |||
Can an If statement answer an If statement? | Excel Discussion (Misc queries) | |||
appending and IF statement to an existing IF statement | Excel Worksheet Functions |