I am trying to write a macro for a time card. I have a column for total hours and I want to write a code that puts a formula in the total hours column for the number of hours work each day. My question is I wrote some code for it and it works for all sheets except for sheet 1.
My code is:
Range("G6:G10").Formula = "=C6-B6+E6-D6+F6-E6)*24"
Why doesn't it work in sheet 1? In sheet 1 it shows "########" in the cells but shows the formula in the formula bar.
Help
My code is:
Range("G6:G10").Formula = "=C6-B6+E6-D6+F6-E6)*24"
Why doesn't it work in sheet 1? In sheet 1 it shows "########" in the cells but shows the formula in the formula bar.
Help