Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
DJ_Swammi
 
Posts: n/a
Default Inserting a string seach within a complex function

Hi everyone, quick question:

How can I use IF(ISNUMBER(SEARCH... within a SUMPRODUCT statement?

Here's the code I came up with, but it doesn't really seem to work:

=SUMPRODUCT((Strategies!$B$3:$B$62=1)*(Strategies! $E$3:$E$62=(IF(ISNUMBER(SEARCH(1,Strategies!$E$3:$ E$62)),1,0))))/(COUNTIF(Strategies!$B$2:$B$62,1))

Any suggestions?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom
 
Posts: n/a
Default Inserting a string seach within a complex function

IF should not be involved

=SUMPRODUCT((Strategies!$B$3:$B$62=1)*(ISNUMBER(SE ARCH(1,Strategies!$E$3:$E$
62))))

will count the values, if you need to sum you need to add an array but since
I don't know what you are summing you have to post back
I also noted that your countif uses B2:B62 not B3:B62


--

Regards,

Peo Sjoblom


replace
"DJ_Swammi" wrote in message
...
Hi everyone, quick question:

How can I use IF(ISNUMBER(SEARCH... within a SUMPRODUCT statement?

Here's the code I came up with, but it doesn't really seem to work:


=SUMPRODUCT((Strategies!$B$3:$B$62=1)*(Strategies! $E$3:$E$62=(IF(ISNUMBER(SE
ARCH(1,Strategies!$E$3:$E$62)),1,0))))/(COUNTIF(Strategies!$B$2:$B$62,1))

Any suggestions?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default Inserting a string seach within a complex function

Hi!

Try this:

=SUMPRODUCT(--(Strategies!$B$3:$B$62=1),--(ISNUMBER(FIND(1,Strategies!$E$3:$E$62))))/COUNTIF(Strategies!$B$2:$B$62,1)

NB: If COUNTIF(Strategies!$B$2:$B$62,1) = 0 you'll get a #DIV/0! error.

Biff

"DJ_Swammi" wrote in message
...
Hi everyone, quick question:

How can I use IF(ISNUMBER(SEARCH... within a SUMPRODUCT statement?

Here's the code I came up with, but it doesn't really seem to work:

=SUMPRODUCT((Strategies!$B$3:$B$62=1)*(Strategies! $E$3:$E$62=(IF(ISNUMBER(SEARCH(1,Strategies!$E$3:$ E$62)),1,0))))/(COUNTIF(Strategies!$B$2:$B$62,1))

Any suggestions?



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
DJ_Swammi
 
Posts: n/a
Default Inserting a string seach within a complex function

Thanks Biff, that seemed to do the trick!

"Biff" wrote:

Hi!

Try this:

=SUMPRODUCT(--(Strategies!$B$3:$B$62=1),--(ISNUMBER(FIND(1,Strategies!$E$3:$E$62))))/COUNTIF(Strategies!$B$2:$B$62,1)

NB: If COUNTIF(Strategies!$B$2:$B$62,1) = 0 you'll get a #DIV/0! error.

Biff

"DJ_Swammi" wrote in message
...
Hi everyone, quick question:

How can I use IF(ISNUMBER(SEARCH... within a SUMPRODUCT statement?

Here's the code I came up with, but it doesn't really seem to work:

=SUMPRODUCT((Strategies!$B$3:$B$62=1)*(Strategies! $E$3:$E$62=(IF(ISNUMBER(SEARCH(1,Strategies!$E$3:$ E$62)),1,0))))/(COUNTIF(Strategies!$B$2:$B$62,1))

Any suggestions?




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
Inserting a decimal from the right of a string MarkM Excel Discussion (Misc queries) 6 December 13th 05 05:37 PM
Function to convert Time String to Time Andibevan Excel Worksheet Functions 6 August 19th 05 01:19 PM
Complex if and mid function. brookdale Excel Worksheet Functions 5 June 28th 05 07:52 PM
Inserting an AutoDate Function MissTrish New Users to Excel 1 May 26th 05 06:02 PM
Copy an IF function when Inserting new row Philobr Excel Discussion (Misc queries) 1 December 3rd 04 10:45 AM


All times are GMT +1. The time now is 06:52 PM.

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"