I have a formula but need something else from it

richard hales

Board Regular
Good evening everyone

I have this formula which works great but I want it to do something else
=IF(COUNTA(B4:B7),SUMPRODUCT(SUMIF('cmart code'!D2:D15,B4:B7,'cmart code'!E2:E15)),"")
Sheet1. B4:B7 is where the formula looks for a code
Sheet2. 'cmart code'!D2:D15 is the lookup code in this case it’s D2=service1 to D15= service14.
'cmart code'!E2:E15)),"") E2=1 E15=14 and if nothing is entered in B4:B7 it returns a blank cell, in Sheet2. Cell B15.
Now if any one can help me please what I need it to do now is:
D2=service1 to D15= service14 to stay the same but E2=1 E15=14 to change to GF

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
from the way you've explained it, what you need to do is merely edit the E-column Range to have the alpha characters "GF" in them.

thanks for the reply nbrcrunch, i changed the E-column to GF but in Cell B15 it returns a 0 am looking for it to return GF or stay blank.

The objctive is not very clear...

If you want to copy the formula across with the sum range changing...

=IF(COUNTA(\$B\$4:\$B\$7),SUMPRODUCT(SUMIF('cmart code'!\$D\$2:\$D\$15,\$B\$4:\$B\$7,'cmart code'!E\$2:E\$15)),"")

If you want it to have GF2:GF15 as the sum range, use an adjusted copy of the formula:

=IF(COUNTA(B4:B7),SUMPRODUCT(SUMIF('cmart code'!D2:D15,B4:B7,'cmart code'!GF2:GF15)),"")

If the foregoing is of no help, try to elaborate on your objective.

Replies
10
Views
736
Replies
1
Views
294
Replies
3
Views
240
Replies
6
Views
176
Replies
2
Views
146

1,221,127
Messages
6,158,101
Members
451,464
Latest member
Holden3

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?

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

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