I have a formula but need something else from it

richard hales

Board Regular
Joined
Feb 18, 2009
Messages
52
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
 

Some videos you may like

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

nbrcrunch

Well-known Member
Joined
Jan 1, 2003
Messages
2,062
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.
 

richard hales

Board Regular
Joined
Feb 18, 2009
Messages
52
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.
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,203
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,127,616
Messages
5,625,880
Members
416,141
Latest member
Bartek9q

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
Top