Macros

Copper Contributor

After creating my macro, I ran into a slight setback. I made the macro to change the date in column D to the date in column L, only when column K is equal to RS. I would like to be able to apply this to the entire column, but when I do that it takes the date completely out of the cells in column D that do not have RS in column K. What do I have to write in the coding for the dates in column D to remain the same when RS is not in column K? 

 

This is the formula I used: =IF(K19=Totals!$N$11,Dereck!L19,"")

2 Replies

Your Formula (where is the macro?) is =IF(K19=Totals!$N$11,Dereck!L19,""). It says:

-if K19 has the same value of Totals!$N$11, then return Dereck!L19...

-...otherwise return a null string

If you wish to keep another date then you have to specify this in the "if false" portion of the formula; for example: =IF(K19=Totals!$N$11,Dereck!L19,D19)

 

I don't know tne name of your sheets, so this is an example; adapt it to your data layout.

 

Bye

 

 

I guess the macro changes already entered into the column D dates on another ones if some condition met, otherwise keep them unchanged