Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Help with SUMIF and criteria

I'm building a sheet that lists product units over a twelve month
period. I want to calculate the SUM of the first three months where
there's been activity...find the first cell within the twelve month
range that has a positive units sold value and sum that cell with the
next two adjacent cells, which can be either positive or negative.
(The initial cell must be positive.)

Any tips on how to build this a formula for this are greatly
appreciated!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Help with SUMIF and criteria

Hi John,
Some assumptions: Your products are listes in column A and your month
are listed in row 1. So the activitie for the first product in the
first month would be listed in cell B2. then try the following formula
for the first product in row 2:
=SUM(OFFSET(B2,0,MATCH(TRUE,B2:M20,0)-1,1,3))
enter this as array formula (CTRL+SHIFT+ENTER)

HTH
Frank



John wrote:
I'm building a sheet that lists product units over a twelve month
period. I want to calculate the SUM of the first three months where
there's been activity...find the first cell within the twelve month
range that has a positive units sold value and sum that cell with the
next two adjacent cells, which can be either positive or negative.
(The initial cell must be positive.)

Any tips on how to build this a formula for this are greatly
appreciated!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Help with SUMIF and criteria

Frank,
I should have mentioned, the list is rows structured like this:
product, month1 units, month2 units, month3 units...month12 units,
initial 3mo units.

I need to help with a formula to calc the "initial 3mo units." (I'm
actually simplifying the data list for the purpose of discussion.)


"Frank Kabel" wrote in message ...
Hi John,
Some assumptions: Your products are listes in column A and your month
are listed in row 1. So the activitie for the first product in the
first month would be listed in cell B2. then try the following formula
for the first product in row 2:
=SUM(OFFSET(B2,0,MATCH(TRUE,B2:M20,0)-1,1,3))
enter this as array formula (CTRL+SHIFT+ENTER)

HTH
Frank

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Help with SUMIF and criteria

Hi John

if I understood you correctly this seems to be the same as my
assumption. E.g.
A2: Product
B2: month 1 units
C2: month 2 units
....
M2: month 12 units

If this is your spreadsheet layout, you can use my formula. If you have
a differing layout you can 8if you like) send me your spreadsheet and
I'll adapt the formula for you

HTH
Frank


John wrote:
Frank,
I should have mentioned, the list is rows structured like this:
product, month1 units, month2 units, month3 units...month12 units,
initial 3mo units.

I need to help with a formula to calc the "initial 3mo units." (I'm
actually simplifying the data list for the purpose of discussion.)


"Frank Kabel" wrote in message
...
Hi John,
Some assumptions: Your products are listes in column A and your

month
are listed in row 1. So the activitie for the first product in the
first month would be listed in cell B2. then try the following
formula for the first product in row 2:
=SUM(OFFSET(B2,0,MATCH(TRUE,B2:M20,0)-1,1,3))
enter this as array formula (CTRL+SHIFT+ENTER)

HTH
Frank



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Help with SUMIF and criteria

Frank, thanks a bunch for your help! Your suggestion seems to work just fine.
-John


=SUM(OFFSET(B2,0,MATCH(TRUE,B2:M20,0)-1,1,3))
enter this as array formula (CTRL+SHIFT+ENTER)



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Help with SUMIF and criteria

Sorry, but I thought I'd be able to figure out the "real" formula
after getting something to work with from here. Frank, do you or
anyone else have a suggestion as to how to modify your formula to get
work with this exact data:

Product, StreetDate, Month1, Month2, Month3..Month12,
Initial_3month_Activity

Where Initial_3Mo_Activity sums the three contiguous month values
starting at the Month# corresponding to its StreetDate (instead of the
first positive Month value).

Any tips are greatly appreciated! (I may need to repost this as a new
thread if there aren't any responses since this has nothing to do with
SUMIF.)

(Frank's formula:)
=SUM(OFFSET(B2,0,MATCH(TRUE,B2:M20,0)-1,1,3))

-j



"Frank Kabel" wrote in message ...
Hi John,
Some assumptions: Your products are listes in column A and your month
are listed in row 1. So the activitie for the first product in the
first month would be listed in cell B2. then try the following formula
for the first product in row 2:
=SUM(OFFSET(B2,0,MATCH(TRUE,B2:M20,0)-1,1,3))
enter this as array formula (CTRL+SHIFT+ENTER)

HTH
Frank



John wrote:
I'm building a sheet that lists product units over a twelve month
period. I want to calculate the SUM of the first three months where
there's been activity...find the first cell within the twelve month
range that has a positive units sold value and sum that cell with the
next two adjacent cells, which can be either positive or negative.
(The initial cell must be positive.)

Any tips on how to build this a formula for this are greatly
appreciated!

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Help with SUMIF and criteria

=SUM(OFFSET(C2,0,MATCH(TRUE,C2:N20,0)-1,1,3))

--
Regards,
Tom Ogilvy

John wrote in message
om...
Sorry, but I thought I'd be able to figure out the "real" formula
after getting something to work with from here. Frank, do you or
anyone else have a suggestion as to how to modify your formula to get
work with this exact data:

Product, StreetDate, Month1, Month2, Month3..Month12,
Initial_3month_Activity

Where Initial_3Mo_Activity sums the three contiguous month values
starting at the Month# corresponding to its StreetDate (instead of the
first positive Month value).

Any tips are greatly appreciated! (I may need to repost this as a new
thread if there aren't any responses since this has nothing to do with
SUMIF.)

(Frank's formula:)
=SUM(OFFSET(B2,0,MATCH(TRUE,B2:M20,0)-1,1,3))

-j



"Frank Kabel" wrote in message

...
Hi John,
Some assumptions: Your products are listes in column A and your month
are listed in row 1. So the activitie for the first product in the
first month would be listed in cell B2. then try the following formula
for the first product in row 2:
=SUM(OFFSET(B2,0,MATCH(TRUE,B2:M20,0)-1,1,3))
enter this as array formula (CTRL+SHIFT+ENTER)

HTH
Frank



John wrote:
I'm building a sheet that lists product units over a twelve month
period. I want to calculate the SUM of the first three months where
there's been activity...find the first cell within the twelve month
range that has a positive units sold value and sum that cell with the
next two adjacent cells, which can be either positive or negative.
(The initial cell must be positive.)

Any tips on how to build this a formula for this are greatly
appreciated!



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Help with SUMIF and criteria

After rereading your problem statement, assuming B2 will contain a value
between 1 and 12 inclusive:

=SUM(OFFSET(B2,0,B2,1,3))



--
Regards,
Tom Ogilvy

Tom Ogilvy wrote in message
...
=SUM(OFFSET(C2,0,MATCH(TRUE,C2:N20,0)-1,1,3))

--
Regards,
Tom Ogilvy

John wrote in message
om...
Sorry, but I thought I'd be able to figure out the "real" formula
after getting something to work with from here. Frank, do you or
anyone else have a suggestion as to how to modify your formula to get
work with this exact data:

Product, StreetDate, Month1, Month2, Month3..Month12,
Initial_3month_Activity

Where Initial_3Mo_Activity sums the three contiguous month values
starting at the Month# corresponding to its StreetDate (instead of the
first positive Month value).

Any tips are greatly appreciated! (I may need to repost this as a new
thread if there aren't any responses since this has nothing to do with
SUMIF.)

(Frank's formula:)
=SUM(OFFSET(B2,0,MATCH(TRUE,B2:M20,0)-1,1,3))

-j



"Frank Kabel" wrote in message

...
Hi John,
Some assumptions: Your products are listes in column A and your month
are listed in row 1. So the activitie for the first product in the
first month would be listed in cell B2. then try the following formula
for the first product in row 2:
=SUM(OFFSET(B2,0,MATCH(TRUE,B2:M20,0)-1,1,3))
enter this as array formula (CTRL+SHIFT+ENTER)

HTH
Frank



John wrote:
I'm building a sheet that lists product units over a twelve month
period. I want to calculate the SUM of the first three months where
there's been activity...find the first cell within the twelve month
range that has a positive units sold value and sum that cell with

the
next two adjacent cells, which can be either positive or negative.
(The initial cell must be positive.)

Any tips on how to build this a formula for this are greatly
appreciated!





  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Help with SUMIF and criteria

Actually, B2 should never contain a value greater than 10 or you will go
beyond your data.

--
Regards,
Tom Ogilvy

Tom Ogilvy wrote in message
...
After rereading your problem statement, assuming B2 will contain a value
between 1 and 12 inclusive:

=SUM(OFFSET(B2,0,B2,1,3))



--
Regards,
Tom Ogilvy

Tom Ogilvy wrote in message
...
=SUM(OFFSET(C2,0,MATCH(TRUE,C2:N20,0)-1,1,3))

--
Regards,
Tom Ogilvy

John wrote in message
om...
Sorry, but I thought I'd be able to figure out the "real" formula
after getting something to work with from here. Frank, do you or
anyone else have a suggestion as to how to modify your formula to get
work with this exact data:

Product, StreetDate, Month1, Month2, Month3..Month12,
Initial_3month_Activity

Where Initial_3Mo_Activity sums the three contiguous month values
starting at the Month# corresponding to its StreetDate (instead of the
first positive Month value).

Any tips are greatly appreciated! (I may need to repost this as a new
thread if there aren't any responses since this has nothing to do with
SUMIF.)

(Frank's formula:)
=SUM(OFFSET(B2,0,MATCH(TRUE,B2:M20,0)-1,1,3))

-j



"Frank Kabel" wrote in message

...
Hi John,
Some assumptions: Your products are listes in column A and your

month
are listed in row 1. So the activitie for the first product in the
first month would be listed in cell B2. then try the following

formula
for the first product in row 2:
=SUM(OFFSET(B2,0,MATCH(TRUE,B2:M20,0)-1,1,3))
enter this as array formula (CTRL+SHIFT+ENTER)

HTH
Frank



John wrote:
I'm building a sheet that lists product units over a twelve month
period. I want to calculate the SUM of the first three months

where
there's been activity...find the first cell within the twelve

month
range that has a positive units sold value and sum that cell with

the
next two adjacent cells, which can be either positive or negative.
(The initial cell must be positive.)

Any tips on how to build this a formula for this are greatly
appreciated!







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
SUMIF with 2 criteria ruby Excel Worksheet Functions 9 January 12th 09 04:30 PM
SUMIF Criteria Emile[_2_] Excel Worksheet Functions 1 April 24th 07 04:25 PM
is there anyway to use sumif using 2 criteria Steve 51 Excel Worksheet Functions 4 August 23rd 06 03:23 PM
nested sumif or sumif with two criteria dshigley Excel Worksheet Functions 5 April 5th 05 03:34 AM
Sumif() with criteria Jim May Excel Worksheet Functions 4 February 18th 05 02:29 PM


All times are GMT +1. The time now is 05:51 AM.

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

About Us

"It's about Microsoft Excel"