IF statement macro

Q

Qwerty

I've been trying to convert an IF statement to something I can run in a
macro with no success.

Here is the statement
=IF(=MOD(NOW(),1)<=0.270833333333333,"SHIFT:
3RD",IF(=MOD(NOW(),1)<=0.604166666666667,"SHIFT:
1ST",IF(=MOD(NOW(),1)<=0.9375,"SHIFT: 2ND",IF(=MOD(NOW(),1)<=1,"SHIFT:
3RD",""))))

It started out as this
=IF(T2<=T3,"SHIFT: 3RD",IF(T2<=T4,"SHIFT: 1ST",IF(T2<=T5,"SHIFT:
2ND",IF(T2<=T6,"SHIFT: 3RD",""))))

Cell T2 is =MOD(NOW(),1)
Cell T3 is 0.270833333333333
Cell T4 is 0.604166666666667
Cell T5 is 0.9375
Cell T6 is 1

I don't want the macro to refer to the cells but the actual formulas/values
in the string because I want to delete the cells so that the worksheet isn't
updated when opened, only when I run the macro.

I would appreciate any help on this code since I am relatively new to
macros.

TIA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Worksheets in Loop 1
Search and Display 5
Macro creation help 1
About Data Validation 2
PrintArea Macro Help 1
Set Print Area Macro 1
Setting Print Area (Macro Question) 1
HLOOKUP PROBLEM 4

Top