Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Ted Metro
 
Posts: n/a
Default 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
  #2   Report Post  
Ted Metro
 
Posts: n/a
Default

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

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
Calculation based on a condition mac_see Excel Worksheet Functions 3 April 22nd 05 01:24 AM
Adding contents of one cell to a range of cells. CLJinVA Excel Worksheet Functions 1 February 10th 05 10:19 PM
make a cell empty based on condition mpierre Charts and Charting in Excel 2 December 29th 04 01:01 PM
how do you format a row of cells based upon a value in another ce. hazenb1 Excel Discussion (Misc queries) 1 December 9th 04 04:22 AM
ADDING CELLS WHICH ARE <> THAN OTHER CELLS boogie Excel Worksheet Functions 2 November 25th 04 02:41 PM


All times are GMT +1. The time now is 05:18 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"