Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 62
Default possible to use IF to add formula?

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?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default possible to use IF to add formula?

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

On Aug 3, 2:26 am, John Smith wrote:
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?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"