Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 50
Default sumif or sumproduct with a left statement

I currently have the following formula :

=SUMPRODUCT(--(LEFT(Xfers!C:C,6)="834097"),(Xfers!H:H))

which this works great for items occurring in column c, but i also need it
to sum column H when column E's first 6 characters = 834097 but i don't want
it to count them twice. So if column C and E match then it shouldn't sum
column H twice.

Can someone help me with this? Thanks
--
Eric
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default sumif or sumproduct with a left statement

=SUMPRODUCT((LEFT(Xfers!C:C,6)="834097")+(LEFT(Xfe rs!E:E,6)="834097"),(Xfers!H:H))

Use the + (or) in your sumproduct. I am assuming that since you are using
whole column references that you have xl2007.

Hope this helps.
--
John C


"Eric D" wrote:

I currently have the following formula :

=SUMPRODUCT(--(LEFT(Xfers!C:C,6)="834097"),(Xfers!H:H))

which this works great for items occurring in column c, but i also need it
to sum column H when column E's first 6 characters = 834097 but i don't want
it to count them twice. So if column C and E match then it shouldn't sum
column H twice.

Can someone help me with this? Thanks
--
Eric

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default sumif or sumproduct with a left statement

In other words you want an OR condition:

=SUMPRODUCT(--((LEFT(C2:C10,6)="834097")+(LEFT(E2:E10,6)="834097 ")0),H2:H10)

--
Biff
Microsoft Excel MVP


"Eric D" wrote in message
...
I currently have the following formula :

=SUMPRODUCT(--(LEFT(Xfers!C:C,6)="834097"),(Xfers!H:H))

which this works great for items occurring in column c, but i also need it
to sum column H when column E's first 6 characters = 834097 but i don't
want
it to count them twice. So if column C and E match then it shouldn't sum
column H twice.

Can someone help me with this? Thanks
--
Eric



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default sumif or sumproduct with a left statement

=SUMPRODUCT(
--((LEFT(Xfers!C:C,6)="834097")+(LEFT(Xfers!E:E,6)=" 834097")0),
(Xfers!H:H))



Eric D wrote:

I currently have the following formula :

=SUMPRODUCT(--(LEFT(Xfers!C:C,6)="834097"),(Xfers!H:H))

which this works great for items occurring in column c, but i also need it
to sum column H when column E's first 6 characters = 834097 but i don't want
it to count them twice. So if column C and E match then it shouldn't sum
column H twice.

Can someone help me with this? Thanks
--
Eric


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default sumif or sumproduct with a left statement

i don't want it to count them twice.

That'll sum twice if C1 = x *and* E1 = x

=2*H1

--
Biff
Microsoft Excel MVP


"John C" <johnc@stateofdenial wrote in message
...
=SUMPRODUCT((LEFT(Xfers!C:C,6)="834097")+(LEFT(Xfe rs!E:E,6)="834097"),(Xfers!H:H))

Use the + (or) in your sumproduct. I am assuming that since you are using
whole column references that you have xl2007.

Hope this helps.
--
John C


"Eric D" wrote:

I currently have the following formula :

=SUMPRODUCT(--(LEFT(Xfers!C:C,6)="834097"),(Xfers!H:H))

which this works great for items occurring in column c, but i also need
it
to sum column H when column E's first 6 characters = 834097 but i don't
want
it to count them twice. So if column C and E match then it shouldn't sum
column H twice.

Can someone help me with this? Thanks
--
Eric





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 50
Default sumif or sumproduct with a left statement

Thank you all - Valko and Dave that's what i needed
John yours worked too but counted column H twice when 834097 appeared in
both, but thanks anyway
--
Eric


"Dave Peterson" wrote:

=SUMPRODUCT(
--((LEFT(Xfers!C:C,6)="834097")+(LEFT(Xfers!E:E,6)=" 834097")0),
(Xfers!H:H))



Eric D wrote:

I currently have the following formula :

=SUMPRODUCT(--(LEFT(Xfers!C:C,6)="834097"),(Xfers!H:H))

which this works great for items occurring in column c, but i also need it
to sum column H when column E's first 6 characters = 834097 but i don't want
it to count them twice. So if column C and E match then it shouldn't sum
column H twice.

Can someone help me with this? Thanks
--
Eric


--

Dave Peterson

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
Sum if statement with a left statement Eric D Excel Discussion (Misc queries) 4 July 23rd 08 05:31 PM
SUMPRODUCT AND LEFT K Excel Worksheet Functions 6 July 8th 08 07:09 PM
Sumif/vlookup/left Gingit Excel Discussion (Misc queries) 4 April 21st 07 12:32 AM
SUMIF and LEFT and Named Ranges DaveMoore Excel Worksheet Functions 1 October 5th 06 11:03 AM
Left and Sumproduct Alexball Excel Discussion (Misc queries) 1 August 9th 06 12:00 PM


All times are GMT +1. The time now is 10:50 AM.

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"