Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default need to sum with offset

is there a way to sum items in a column when the column is variable? I am
thinking of using offset or match for the column reference, but am not sure
how to sum once I have the proper column. For example:

jan feb mar
apples 151,773.50 154,178.17 160,318.00
lemons 199,483.34 195,221.18 198,948.17
oranges 244,926.24 227,642.54 232,229.79
bananas 70,326.08 37,356.37 41,320.48
limes 263,423.60 243,861.72 230,643.48

I would like to compare citrus sales for January and March. So I'd like to
sum rows 3:4,6. But how can I use a formula to select column D? Also, next
month "Mar" may not be in column D.

I could add a column and add the grouping labels and then sumif, but that
would mean redesigning a massive workbook so I'm hoping there is another way.

Thanks for your thoughts and help :)
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 265
Default need to sum with offset

Assumptions:

A2:A6 contains the fruit

B1:D1 contains the month

B2:D6 contains the data

Formula:

To sum Jan, where the corresponding values in A2:A6 equals lemons,
limes, or oranges, try...

=SUMPRODUCT(--ISNUMBER(MATCH($A$2:$A$6,{"Lemons","Limes","Orange s"},0)),I
NDEX($B$2:$D$6,0,MATCH("Jan",$B$1:$D$1,0)))

Adjust the ranges, accordingly.

Hope this helps!

http://www.xl-central.com

In article ,
Fellow Wanderer wrote:

is there a way to sum items in a column when the column is variable? I am
thinking of using offset or match for the column reference, but am not sure
how to sum once I have the proper column. For example:

jan feb mar
apples 151,773.50 154,178.17 160,318.00
lemons 199,483.34 195,221.18 198,948.17
oranges 244,926.24 227,642.54 232,229.79
bananas 70,326.08 37,356.37 41,320.48
limes 263,423.60 243,861.72 230,643.48

I would like to compare citrus sales for January and March. So I'd like to
sum rows 3:4,6. But how can I use a formula to select column D? Also, next
month "Mar" may not be in column D.

I could add a column and add the grouping labels and then sumif, but that
would mean redesigning a massive workbook so I'm hoping there is another way.

Thanks for your thoughts and help :)

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with Offset kazoo Excel Discussion (Misc queries) 4 August 26th 08 10:24 PM
Compare Cell Values, Offset(-1,0), Offset(-1,-1), and xlFillDefaul RyGuy Excel Worksheet Functions 2 September 28th 07 10:54 PM
Offset Help Hunter Excel Worksheet Functions 5 January 26th 07 02:21 PM
Offset. Joe Edwards Excel Worksheet Functions 2 November 2nd 06 06:57 AM
SUM(OFFSET)? Mike Fogleman Excel Worksheet Functions 10 December 29th 04 08:39 PM


All times are GMT +1. The time now is 01:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"