| View previous topic :: View next topic |
| Author |
Message |
Korak OOo Enthusiast

Joined: 25 Sep 2004 Posts: 116
|
Posted: Thu Mar 10, 2011 6:28 am Post subject: Formula help |
|
|
Trying to see if there is a shorter way to do what I want than having a large group of if/then statements.
I have the following cells. A4-T4
A4 is a constant.
Each week I will add a number into the next cell to the right. So week 1 will have B4 with a value. The next week C4 will get a value until I am all the way up to T4. Until a value is added into one of these cells, it will remain blank.
I want U4 to be equal to A4 minus the last value entered. So when E4 has a value then U4 will be A4-E4. The next week when F4 is given a value then U4 will be A4-F4 and so on.
I know that i can start at T4 and check with an IF and keep going left until I hit B4, but that is a lot of nested IFs. I was just wondering if anyone sees a better way to do that.
Thanks.
Scott |
|
| Back to top |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
Posted: Thu Mar 10, 2011 6:37 am Post subject: |
|
|
COUNT(range) returns a number about how many numbers are in range.
INDEX(range;1;number) returns the value in range at row #1 and column #number. _________________ Rest in peace, oooforum.org
Get help on http://forum.openoffice.org |
|
| Back to top |
|
 |
Korak OOo Enthusiast

Joined: 25 Sep 2004 Posts: 116
|
Posted: Thu Mar 10, 2011 6:54 am Post subject: |
|
|
Thanks. I don't use the counts very often, but was in the process of looking at countif and an index. That looks like that works well with the count.
Scott |
|
| Back to top |
|
 |
|