# Need help with this extensive formula

#### grev

##### New Member
The result for this is either a zero or a numerical value > 1. I am trying to replace the zero with a blank. However when I do calculations it gives me an error. How can I use this and turn the blank into a calculable result. Thanks for the help.

=IF(COUNTIF('TRKLD SCHED'!\$V\$1:\$BC\$1,A13),HLOOKUP(A13,'TRKLD SCHED'!\$V\$1:\$BC\$113,107,0),"0")+IF(COUNTIF('TRKLD SCHED'!\$D\$1:\$N\$1,A13),HLOOKUP(A13,'TRKLD SCHED'!\$D\$1:\$N\$113,107,0),"0")

### Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

##### MrExcel MVP
On 2002-09-20 12:58, grev wrote:
The result for this is either a zero or a numerical value > 1. I am trying to replace the zero with a blank. However when I do calculations it gives me an error. How can I use this and turn the blank into a calculable result. Thanks for the help.

=IF(COUNTIF('TRKLD SCHED'!\$V\$1:\$BC\$1,A13),HLOOKUP(A13,'TRKLD SCHED'!\$V\$1:\$BC\$113,107,0),"0")+IF(COUNTIF('TRKLD SCHED'!\$D\$1:\$N\$1,A13),HLOOKUP(A13,'TRKLD SCHED'!\$D\$1:\$N\$113,107,0),"0")

http://longre.free.fr/english/index.html

and use the following formula instead:

=IF(ISNA(SETV(HLOOKUP(A13,'TRKLD SCHED'!\$V\$1:\$BC\$113,107,0))),0,GETV())+IF(ISNA(SETV(HLOOKUP(A13,'TRKLD SCHED'!\$D\$1:\$N\$113,107,0))),0,GETV())

You have "0" in the original formula: that should be just 0 without double quotes.

#### Dave Patton

##### Well-known Member
On 2002-09-20 12:58, grev wrote:
The result for this is either a zero or a numerical value > 1. I am trying to replace the zero with a blank. However when I do calculations it gives me an error. How can I use this and turn the blank into a calculable result. Thanks for the help.

=IF(COUNTIF('TRKLD SCHED'!\$V\$1:\$BC\$1,A13),HLOOKUP(A13,'TRKLD SCHED'!\$V\$1:\$BC\$113,107,0),"0")+IF(COUNTIF('TRKLD SCHED'!\$D\$1:\$N\$1,A13),HLOOKUP(A13,'TRKLD SCHED'!\$D\$1:\$N\$113,107,0),"0")

This edits YOUR formula to leave a blank

=IF(COUNTIF('TRKLD SCHED'!\$V\$1:\$BC\$1,A13)>0,HLOOKUP(A13,'TRKLD SCHED'!\$V\$1:\$BC\$113,107,0),"")&IF(COUNTIF('TRKLD SCHED'!\$D\$1:\$N\$1,A13)>0,HLOOKUP(A13,'TRKLD SCHED'!\$D\$1:\$N\$113,107,0),"")
This message was edited by dave patton on 2002-09-20 13:26

#### grev

##### New Member
Im sorry i forgot to mention I currently have left the zero's because they calculate. If I replace the zeros with blanks that is when the problem occurs.

I am using this formula to lookup values from other tables and retreive their respective values.

##### MrExcel MVP

On 2002-09-20 13:27, grev wrote:
Im sorry i forgot to mention I currently have left the zero's because they calculate. If I replace the zeros with blanks that is when the problem occurs.

I am using this formula to lookup values from other tables and retreive their respective values.

If you need to replace 0's (without double quotes around), although I don't see why, you can use SUM instead of +...

=SUM(IF(...),IF(...))

Try using morefunc though.

#### Dave Patton

##### Well-known Member
You stated at the beginning that you wanted to replace the 0 with a blank.

Wrap the formula with an If. The following uses MoreFunc.

=IF(SETV(IF(ISNA(SETV(HLOOKUP(A13,'TRKLD SCHED'!\$V\$1:\$BC\$113,107,0),0)),0,GETV())+IF(ISNA(SETV(HLOOKUP(A13,'TRKLD SCHED'!\$D\$1:\$N\$113,107,0),1)),0,GETV(1)),2),GETV(2),"")

or
=IF(SETV(IF(COUNTIF('TRKLD SCHED'!\$V\$1:\$BC\$1,A13)>0,HLOOKUP(A13,'TRKLD SCHED'!\$V\$1:\$BC\$113,107,0),0)+IF(COUNTIF('TRKLD SCHED'!\$D\$1:\$N\$1,A13)>0,HLOOKUP(A13,'TRKLD SCHED'!\$D\$1:\$N\$113,107,0),0),2),GETV(2),"")

##### MrExcel MVP

[...]
=IF(SETV(IF(COUNTIF('TRKLD SCHED'!\$V\$1:\$BC\$1,A13)>0,HLOOKUP(A13,'TRKLD SCHED'!\$V\$1:\$BC\$113,107,0),0)+IF(COUNTIF('TRKLD SCHED'!\$D\$1:\$N\$1,A13)>0,HLOOKUP(A13,'TRKLD SCHED'!\$D\$1:\$N\$113,107,0),0),2),GETV(2),"")

Dave,

Keeping COUNTIF in defeats the purpose of SETV/GETV.

#### Dave Patton

##### Well-known Member
On 2002-09-20 14:10, Aladin Akyurek wrote:
[...]
=IF(SETV(IF(COUNTIF('TRKLD SCHED'!\$V\$1:\$BC\$1,A13)>0,HLOOKUP(A13,'TRKLD SCHED'!\$V\$1:\$BC\$113,107,0),0)+IF(COUNTIF('TRKLD SCHED'!\$D\$1:\$N\$1,A13)>0,HLOOKUP(A13,'TRKLD SCHED'!\$D\$1:\$N\$113,107,0),0),2),GETV(2),"")

Dave,

Keeping COUNTIF in defeats the purpose of SETV/GETV.

I know. I was just trying to complete OP's original question of showing number >0 or blank.

I showed the diferent solutions but instead of wrapping everything with IF and repeating the formula, I used the more efficient Setv and Getv combo.

#### grev

##### New Member
Thanks guys. It worked. I will disect it to see how it works. Thanks. Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

### Forum statistics

1,168,025
Messages
5,856,909
Members
431,837
Latest member
megantang ### 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