Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default If & sumproduct formula with text

I have 3 columns A, B, C. Column A has rows with either a blank cell, the
word "shift" or the word "hazard". Columns B & C have numbers. I want the
formula to look at a range in column A (A1:A20), and if a row has the word
shift, to multiply columns B & C for the same range. I tried the following
formula with no luck =IF(A1:A20="shift",SUMPRODUCT(B1:B20,C1:C20),0)
Obviously, not the correct formula for this situation. Any help would be
greatly apprectied!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 694
Default If & sumproduct formula with text

Hi Jana
Not sure if this is what you want but try this
=SUMPRODUCT(--(A1:A20="SHIFT"),B1:B20,C1:C20)
HTH
John
"JANA" wrote in message
...
I have 3 columns A, B, C. Column A has rows with either a blank cell, the
word "shift" or the word "hazard". Columns B & C have numbers. I want the
formula to look at a range in column A (A1:A20), and if a row has the word
shift, to multiply columns B & C for the same range. I tried the following
formula with no luck =IF(A1:A20="shift",SUMPRODUCT(B1:B20,C1:C20),0)
Obviously, not the correct formula for this situation. Any help would be
greatly apprectied!


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default If & sumproduct formula with text

Thank you, that worked. One more twist I want to see if excel can do. I
created Column A with just the word "shift" or "hazard", however it really
should have a labor category name with "- shift" or "- hazard" at the end.
Can the formula be changed so instead of searching for the word shift in the
column, to search for the word at the end of a sentence instead?

"John" wrote:

Hi Jana
Not sure if this is what you want but try this
=SUMPRODUCT(--(A1:A20="SHIFT"),B1:B20,C1:C20)
HTH
John
"JANA" wrote in message
...
I have 3 columns A, B, C. Column A has rows with either a blank cell, the
word "shift" or the word "hazard". Columns B & C have numbers. I want the
formula to look at a range in column A (A1:A20), and if a row has the word
shift, to multiply columns B & C for the same range. I tried the following
formula with no luck =IF(A1:A20="shift",SUMPRODUCT(B1:B20,C1:C20),0)
Obviously, not the correct formula for this situation. Any help would be
greatly apprectied!



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default If & sumproduct formula with text

Hi,

Try this

=sumproduct((isnumber(search("Shift",A1:A20,1))*(B 1:B20)*(C1:C20))

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"JANA" wrote in message
...
Thank you, that worked. One more twist I want to see if excel can do. I
created Column A with just the word "shift" or "hazard", however it really
should have a labor category name with "- shift" or "- hazard" at the end.
Can the formula be changed so instead of searching for the word shift in
the
column, to search for the word at the end of a sentence instead?

"John" wrote:

Hi Jana
Not sure if this is what you want but try this
=SUMPRODUCT(--(A1:A20="SHIFT"),B1:B20,C1:C20)
HTH
John
"JANA" wrote in message
...
I have 3 columns A, B, C. Column A has rows with either a blank cell,
the
word "shift" or the word "hazard". Columns B & C have numbers. I want
the
formula to look at a range in column A (A1:A20), and if a row has the
word
shift, to multiply columns B & C for the same range. I tried the
following
formula with no luck =IF(A1:A20="shift",SUMPRODUCT(B1:B20,C1:C20),0)
Obviously, not the correct formula for this situation. Any help would
be
greatly apprectied!



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
2 criteria lookup of text. Return text form column 3. SUMPRODUCT t zzxxcc Excel Worksheet Functions 2 August 26th 08 11:04 PM
Text in SUMPRODUCT J. Trucking Excel Worksheet Functions 5 March 12th 08 12:18 AM
sumproduct text if mass Excel Worksheet Functions 8 November 26th 07 03:44 PM
SUMPRODUCT AND TEXT INM FORMULA BEEM Excel Worksheet Functions 13 June 20th 07 08:57 AM
SUMPRODUCT vs Text??? Ken Excel Worksheet Functions 2 April 9th 05 07:21 PM


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