Isnumber(find( but not "a",

Long Nose

Board Regular
Joined
Nov 19, 2007
Messages
67
Office Version
  1. 365
Platform
  1. Windows
Hi all,

Excel 2010

I am trying to use a wild card in a Sumproduct formula. It is working to find the "a" in a column and returning the expected value, but what I really want to do is exclude the "a" cells. Any ideas?

formula
=SUMPRODUCT(--(SUB580AAL_SubsSalesBySource.xlsx!$A$1:$A$3000="CM"),--(SUB580AAL_SubsSalesBySource.xlsx!$A$1:$A$3000<>""),--ISNUMBER(FIND("A",SUB580AAL_SubsSalesBySource.xlsx!$C$1:$C$3000)),--(SUB580AAL_SubsSalesBySource.xlsx!$B$1:$B$3000=TYPE_S),--(SUB580AAL_SubsSalesBySource.xlsx!$E$1:$E$3000=Curr_Mo),--(SUB580AAL_SubsSalesBySource.xlsx!$F$1:$F$3000=Curr_YR),SUB580AAL_SubsSalesBySource.xlsx!$H$1:$H$3000)

This is the part I need to find a fix for. I need to exclude the "a".
--ISNUMBER(FIND("A",SUB580AAL_SubsSalesBySource.xlsx!$C$1:$C$3000)),
 
Last edited:

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
I'm not sure, but you can give it a shot.

Code:
--ISNUMBER(FIND([COLOR=red]<>[/COLOR]"A",SUB580AAL_SubsSalesBySource.xlsx!$C$1:$C$3000)),
<!-- / message --><!-- edit note -->
 
Upvote 0
That <> was my first thought too, but excel didn't like it and valued out.

Right now I could use the find "A" which is what I don't want, then I could write the formula without the wild card and get all the values including those without the "A" and then subtract the two formulas resulting in the correct number, but this seems unnecessarily complicated.
 
Last edited:
Upvote 0
That <> was my first thought too, but excel didn't like it and valued out.

Right now I could use the find "A" which is what I don't want, then I could write the formula without the wild card and get all the values including those without the "A" and then subtract the two formulas resulting in the correct number, but this seems unnecessarily complicated.
Just at a glance...

Replace ISNUMBER with ISERROR.
 
Upvote 0
the only real way you are going to be able to do this is by putting the find in an if statement before running the formula. I don't think there is a way to tell find to find anything but
 
Upvote 0
Just at a glance...

Replace ISNUMBER with ISERROR.
__________________
.
Biff


That does work, but it really has me puzzled on why.

Thank you.
 
Upvote 0
You are really just reversing what you currently have - FIND returns either a number or an error, so ISERROR, as per Biff's suggestion, is the opposite of ISNUMBER, another way is to change this

--ISNUMBER(FIND("A",SUB580AAL_SubsSalesBySource.xlsx!$C$1:$C$3000))

to this

1-ISNUMBER(FIND("A",SUB580AAL_SubsSalesBySource.xlsx!$C$1:$C$3000))

Note: I just replaced the first "-" with a 1
 
Upvote 0
You are really just reversing what you currently have - FIND returns either a number or an error, so ISERROR, as per Biff's suggestion, is the opposite of ISNUMBER, another way is to change this

--ISNUMBER(FIND("A",SUB580AAL_SubsSalesBySource.xlsx!$C$1:$C$3000))

to this

1-ISNUMBER(FIND("A",SUB580AAL_SubsSalesBySource.xlsx!$C$1:$C$3000))

Note: I just replaced the first "-" with a 1

Thank you Barry. I learned something new today.
 
Upvote 0

Forum statistics

Threads
1,216,175
Messages
6,129,312
Members
449,499
Latest member
HockeyBoi

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top