Adding cells based on condition
I have a table of monthly sales by office so it looks something like this:
a b c d e f etc. 1 city jan feb mar apr may 2 denver 100 150 90 200 3 chicago 250 350 300 425 4 atlanta 175 130 125 150 I have a base month for every city and I want to add the three months following the base month and then subtract the three month sum preceding the base month. So I have Denver's base as April in a separate cell and I want a formula that will reference that base as April and know to add Denver's numbers for May, June and July, and then subract the sum of Denver's Jan., Feb., and March. Likewise if I changed the value for Denver's base month to May then the formula would add Denver's values for June, July and August, and then subtract from that Denver's Feb., March, and April. I could use an Hlookup and do 3 hlookups for the add partand another 3 for the subtract part, but that's one ugly formula. Any ideas...? Ted |
I figured it out, nevermind.
"Ted Metro" wrote: I have a table of monthly sales by office so it looks something like this: a b c d e f etc. 1 city jan feb mar apr may 2 denver 100 150 90 200 3 chicago 250 350 300 425 4 atlanta 175 130 125 150 I have a base month for every city and I want to add the three months following the base month and then subtract the three month sum preceding the base month. So I have Denver's base as April in a separate cell and I want a formula that will reference that base as April and know to add Denver's numbers for May, June and July, and then subract the sum of Denver's Jan., Feb., and March. Likewise if I changed the value for Denver's base month to May then the formula would add Denver's values for June, July and August, and then subtract from that Denver's Feb., March, and April. I could use an Hlookup and do 3 hlookups for the add partand another 3 for the subtract part, but that's one ugly formula. Any ideas...? Ted |
All times are GMT +1. The time now is 02:41 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com