• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Help with formula

Marty the Hat

New Member
Hi, I have a feeling there is a very basic, simple answer to this but I can't figure it out...

I have a sheet that details values for each month, there is a formula in the sheet in cell N3 that currently calculates the difference between the values in cells I3 and H3. What I want to do is modify the formula so that when a value is entered in cell J3 the formula automatically updates and calculates the difference between J3 and I3 and so on each time a new entry is made. I think I need something in my formula that identifies when a cell is the last cell in the row to have an entry (not be null).

Any help greatly appreciated
 

Attachments

  • example270120.xlsx
    8.1 KB · Views: 7
What happens if someone directly fills cell K3 and leaves J3 blank?
What happens when there's only one cell e.g. A3 is filled.
 
Hopefully that would never happen but if it did the formula would just need to calculate the difference between the most recent value and the last populated value.
 
You can use logic like
=INDEX(A3:L3,1,COUNTA(A3:L3))-INDEX(A3:L3,1,COUNTA(A3:L3)-1)
assuming you have at least two cells filled all the time consecutively. I edited my post little late, what will happen when only cell A3 is filled?
 
Thanks Shrivallabha that works perfectly!, doesn't matter if only A3 is filled as this will only be used to compare two values, never when only one is available.
 
Back
Top