possible to use IF to add formula?

  • Thread starter Thread starter John Smith
  • Start date Start date
J

John Smith

I would like to compare every two consecutive cells in a column
and either fill in 0 or a formula, something like this:

if (day(c2) = day(c1),fill in the formula "=r[-1]c + 1", else fill
in zero)--------this sould operate on D1 then copy & paste all the
way to d1225.

Can this be done?
 
You won't be able to do this in D1, as you can't refer to the row
above, so put this formula in D2:

=IF(DAY(C2)=DAY(C1),C1+1,0)

Then select D2 again and copy the formula down by double-clicking the
fill handle (the small black square in the bottom right corner of the
cursor.

Hope this helps.

Pete
 

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

Back
Top