macro if statements
If activecell.value = worksheets("sheet99999").range("a99").value then
Remember that if you're comparing text, ABC < aBc and ABC < abc (and so
forth).
If lcase(activecell.value) _
= lcase(worksheets("sheet99999").range("a99").value) then
is one way around it if you want to ignore case.
Selection can be multiple cells. Activecell will be one cell.
Donna S wrote:
I'm trying to write a simple if statement that looks at an active cell and
compares is to the data in another cell. So far I have:
If Selection.Value = ??????? Then
Please help me fill in the ???????. This is probably very simple but I'm
just learning.
Thanks,
--
Dave Peterson
|