Difference of data in row?

D

D-Wang

Hi everyone,

I'm new to Excel and trying to make a database for weight loss over
period of 6 weeks (for now). Im trying to come up with function tha
will show the difference between itself and the previous cell an
display it in a "results" cell. Now... I have a 6 week schedule goin
from B3:G3 and the "results" in H3. so basically what i want to do i
have B3-C3, C3-D3, D3-E3, E3-F3, F3-G3 and display the progress in H3.
Main problem is the data isn't avalible yet and i want it to updat
from week to week without doing the math manually at each entry. Al
attempts on my part have resulted in a #VALUE error. Hope someone her
can help... Please let me know if this makes no sence or if i need t
explain something better.

Thank you,

D-wan
 
L

Leo Heuser

Hi D-wang

Here's one way to do it:

In H3 enter

=IF(COUNT(C3:G3)=0,"Start weight",OFFSET(B3,0,COUNT(C3:G3))-
OFFSET(B3,0,COUNT(C3:G3)-1))

In i3 enter

=IF(COUNT(C3:G3)=0,"Start weight",-INDEX(B3-C3:G3,COUNT(B3:G3)-1))

H3 will show the difference from week to week, while
i3 will display the running difference from you start weight.
 
L

Leo Heuser

You're welcome, D-Wang, and thanks
for the feedback :)

I hope you succeed with the weight loss!

LeoH
 

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