# Sumproduct + Isnumber(search) ?

#### ddasilva

##### New Member
Hi All,

I have problem that I think I am overcomplicating and was hoping I could get some advice please.

In my spreadsheet there are two pertinent columns. One is a dollar amount and the other is a description.

ex.
 COIN 0.71 CASH 5 CREDITCARD4786 18.99 CASH 4 CREDITCARD0887 103.74

<tbody>
</tbody>

How can I get a total of all the cells that have a certain phrase in their description? I want to know how much came in from all credit card deposits but the last 4 digits are never the same. I can do an isnumber + search to indicate which cells match but then I have to use sumif and a grand total. I also did something similar with index + match.

Is there a cleaner way? I'm guessing it might be sumproduct but I can't figure out the syntax at all.

### Excel Facts

Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

#### AlanY

##### Well-known Member
can try the sumif() with wildcard like this

#### ddasilva

##### New Member
Thank you for your suggestion but I neglected to look at my original data and was using the one from my workaround instead. I had used isnumber + search, if, and then right(4) to make that new list.

In place of "CreditCard" it will normally say VISA or AMEX to begin with. How could I shorten the process to accomplish the same thing?

#### AlanY

##### Well-known Member
you can modify the formula like this

#### aqeelnokia99

##### Board Regular
=SUMPRODUCT(ISNUMBER(SEARCH("CREDITCARD",\$A\$1:\$A\$5))*(\$B\$1:\$B\$5))

Replies
1
Views
55
Replies
1
Views
198
Replies
1
Views
164
Replies
1
Views
146
Replies
2
Views
221