Conditional Formatting and Printing

J

Jay Fincannon

i have a column with formula in cell E2, =$e1+$d2 and copied down 14
rows.
cell E2 is conditionally formatted 'cell value is equal to $e1
format font color white' and the other 14 cells formatted the same.
works ok on the screen but print preview and print on paper prints all
of the values in column E whether the value is the same or different
from the cell above. how come? is there a fix?
 
T

Thomas [PBD]

Jay,

Looks like you are attempting a running total. Here is a code that I have
used in the past to eliminate this. It does not require the use of
conditional formatting. Basically, it checks to see if D2 is blank or if
there is an error summing E1+D2, which it will then return a blank, if not
return the sum E1 + D2.

=IF(OR(D2="",ISERROR(E1+D2)),"",E1+D2)
 
J

Jay Fincannon

Thomas here's the thing. this sheet is for accumulated mileage for two
weeks that is turned in to payroll. however some days I don't drive so
cells in column E should be blank for those days.

Column A = date column B = start mileage C = ending miles D = total
for that day and E = running total for two weeks. the IF/OR would work
if there was mileage everyday.
Jay
 
T

Thomas [PBD]

Jay,

Ah-ha. I see. Well, try this instead:
E1: =IF(D1="","",D1)
E2: =IF((SUM($D$1:D2)-SUM($D$1:D1))=0,"",SUM($D$1:D2))

You can pull this formula down as far as you need it. I assumed that E1 was
not a header, if it is you can simply use the second formula from the first
record through the last.
 

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

Top