Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
IF/THEN Statement - Simple Question...
MSTeam,
I have a situation where a portion of a macro I have written adds a column when ran. How can I create code that will check to see if this column is already there so, if that portion of the macro see's this column, it does not add a column. Here's what I have thus far (inserts colume and labels it "Flagged"): Columns("B:B").Select Selection.Insert Shift:=xlToRight Range("B6").Select ActiveCell.FormulaR1C1 = "Flagged" With ActiveCell.Characters(Start:=1, Length:=7).Font .Name = "Tahoma" .FontStyle = "Bold" .Size = 8 End With Simple enough. I need something like an IF statement that checks if "Flagged" exists and skips this portion of the code. Thanks for all your time and energy, -m |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
IF/THEN Statement - Simple Question...
Hi,
This should be what you need assuming that B6 contains your flagged value Thanks, Simon range("B6").select if activecell.value <"Flagged" then do your stuff end if -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200610/1 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
IF formula-simple question; simple operator | Excel Discussion (Misc queries) | |||
Simple IF statement (hopefully!!) | Excel Discussion (Misc queries) | |||
Simple Simple Excel usage question | Excel Discussion (Misc queries) | |||
Another Quick Simple VBA question (if...then statement) | Excel Programming | |||
simple question, hopefully a simple answer! | Excel Programming |