F
F.H. van Zelm
Hi guys,
To be honest: for now I lack the spirit to solve my problem by myself.
And it must have been done before so I just ask for help. I'm a lazy
bastard ;-(.
In Excel 2003, a list with items in column B.
In columns C, D etc. in row one are dates. E.g. 01/01/08, 02/01/08,
02/29/08 etc ending with today. In future, more dates will be added.
The intersection of an item row and a date column has an 'x' when
the item is 'on' from that specific date to the next.
In column A, I calculate the total days an item has been on. The
formula reads:
=IF(C2="x",D$1-C$1,0)+IF(D2="x",E$1-D$1,0)+IF(E2="x",F$1-E$1,0)
So it looks like this:
A B C D E F
1 01/01 02/01 02/29 =today()
2 59 item1 x x
3 31 item2 x x
The formula works all right for a few columns. By December, the
formula will be unreadable. In four years it will exceed the 1024-
character limit. In short: this is ugly!
It would be great to compress all IF's to one single IF. I think it
tends to an array formula ... But how?
Or is there some other different and pritty solution?
To be honest: for now I lack the spirit to solve my problem by myself.
And it must have been done before so I just ask for help. I'm a lazy
bastard ;-(.
In Excel 2003, a list with items in column B.
In columns C, D etc. in row one are dates. E.g. 01/01/08, 02/01/08,
02/29/08 etc ending with today. In future, more dates will be added.
The intersection of an item row and a date column has an 'x' when
the item is 'on' from that specific date to the next.
In column A, I calculate the total days an item has been on. The
formula reads:
=IF(C2="x",D$1-C$1,0)+IF(D2="x",E$1-D$1,0)+IF(E2="x",F$1-E$1,0)
So it looks like this:
A B C D E F
1 01/01 02/01 02/29 =today()
2 59 item1 x x
3 31 item2 x x
The formula works all right for a few columns. By December, the
formula will be unreadable. In four years it will exceed the 1024-
character limit. In short: this is ugly!
It would be great to compress all IF's to one single IF. I think it
tends to an array formula ... But how?
Or is there some other different and pritty solution?