# multiple IF functions combined with an already working formula

#### risto76502

##### New Member
So I have a formula on one sheet that will count each instance of the same word in the same cell on another sheet, but now I need it to do the same thing if other ranges meet certain criteria... The current formual works great, But I just need to tweak it a bit I have tried everything, and just cant seem to get it. My original formula is

=SUMPRODUCT(LEN('bueberry sales'!\$W\$2:\$W\$1000)-LEN(SUBSTITUTE(('blueberry sales'!\$W\$2:\$W\$1000),"blueberry","")))/LEN("blueberry")

I want this formula to do the same thing if range 'blueberry sales'!B2:B1000="fresh" and if 'blueberry sales'!W2:W1000="blueberry"

ANY HELP WOULD BE GREATLY APPRECIATED!!!!

### Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the \$ sign).
Is this...
Rich (BB code):
``````
=SUMPRODUCT(('blueberry sales'!\$B\$2:\$B\$999="fresh")+0,
LEN('blueberry sales'!\$W\$2:\$W\$999)-LEN(SUBSTITUTE('blueberry sales'!\$W\$2:\$W\$999,"blueberry","")))/
LEN("blueberry")
``````

what you are after?

I have 2 seperate categories that I need to build a spreadsheet for..... If I use my current formula, I can enter the same word "blueberry" into any cell from W2:W1000 multiple times and it will count the word each time it is entered. Now I need it to make 2 seperate tables where it will count the word blueberry as long as the word "fresh" is entered in the relative cell in range B2:B1000... Once I figure out this formula, I can make the other table which will be for "not fresh" in the same range of B2:B1000

By the way, i just tried the formula, and it works like a charm. Thank you so much!

By the way, i just tried the formula, and it works like a charm. Thank you so much!

You are welcome.

Replies
1
Views
339
Replies
5
Views
2K
Replies
0
Views
345
Replies
7
Views
283
Replies
6
Views
924

1,196,230
Messages
6,014,133
Members
441,805
Latest member
rwm

### 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.

### Which adblocker are you using?

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

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