Excel - offset() with row() and col() functions?

Asked By Zilla on 01-Mar-07 08:50 PM
I want to use offset(c2, 1, 0, 1, 1) for example, to get
the value from c3, but I want to generalize this with
the row and col functions. I basically want to do this...

sumif(a1:a10, true_condition, offset(a1:a10, 1, 0, 1,1)
IOW, if cells A1, and A3 meet the true_condition, I want
to sum A2 and A4. If A5 and A7 meet the true_condition,
I want to sum A6 and A8, etc.

--
- Zilla
(Remove XSPAM)




JE McGimpsey replied on 01-Mar-07 09:00 PM
The most straightforward way is

=SUMIF(A1:A10,<condition>,A2:A11)


If you really want to use offset:

=SUMIF(A1:A10,<condition>,OFFSET(A1,1,0,,1))
Zilla replied on 02-Mar-07 08:23 AM
Thanks, I was trying to make it more complicated.
I will try both ways.