I have this formula that checks Dates in Column I:
I want to insert a "Select Case" into an existing bit of Code I have, but I don't know all the pitfalls...like checking if Column I is actually a date, or blank or whatever...
I scratched out a basic framework, then realized I really don't know how to proceed.
Can I use an existing "LastRow" variable instead of looping through Column I?
this is sort of what I was looking for:
the result would be inserted into the corresponding cell in column J
thanks for any help, or pointers
blbat
Code:
=IF($I2<=DATE(2018,10,7),"Base", IF(AND($I2>=DATE(2018,10,8),$I2<=DATE(2018,10,29), "Interest",IF(AND($I2>DATE(2018,10,29),$I2<=DATE(2018,12,17), "Advance", IF($I2>=DATE(2018,12,17), "Sustain", "ERROR!"))))
I want to insert a "Select Case" into an existing bit of Code I have, but I don't know all the pitfalls...like checking if Column I is actually a date, or blank or whatever...
I scratched out a basic framework, then realized I really don't know how to proceed.
Can I use an existing "LastRow" variable instead of looping through Column I?
this is sort of what I was looking for:
Code:
Select Case Phases
Dim Result as String
Case is <= 10/7/2018
Result = "Base"
Case is >= 10/8/2018 AND <=10/29/2018
Result = "Interest"
Case is > 10/29/2018 AND <12/17/2018
Result = "Advance"
Case is >= 12/17/2018
Result = "Sustain"
Case Else
Result = "ERROR"
End Select
thanks for any help, or pointers
blbat