Microsoft Excel macro - "SELECT CASE" Statements
I need to do some validation on an Excel file that I have. Rather than type the longest "IF" formula known to man into the formula bar, I'd like to create my statements in the VB Code window.
That way I can basically use VB syntax and make things easier to read.
So if I want an IF statement in Cell C6 how would I go about doing so?
Re: Microsoft Excel macro - "SELECT CASE" Statements
Code:
sht.cells(3,1)="=if(......)"
sht is the active sheet or worksheet you specify.
alternatively
Code:
if sht.cells(3,1)="...." then
end if
Re: Microsoft Excel macro - "SELECT CASE" Statements
So could you do something like this then...
VB Code:
Select Case sht.cells(3,1)
Case vbNullstring
sht.cells(3,2) = "Cell is blank"
' and so on and so on.....
end Select