Show zero from a formula result but not show zero where there are blanks

Arts

Well-known Member
Joined
Sep 28, 2007
Messages
782
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi all

I'm sure there is a simple fix for this but can't seem to find it.

I am doing a look up which works fine and this is pulling back ranking numbers.

The issue I am having that some tasks are ranked 0. (this is so they have been acknowledged and soon to be ranked so a 0 has been marked next to it)

The issue I am having is that it doesn't seem to pull back the "0" where there is a "0" value and if I turn on show zero values through the advanced setting (screen shot below) this brings back zero values for all the blanks.

1677586683359.png


Is there anyway to just show the 0 from the values below when doing the look up but not show zero for the blanks. (the below is dummy data I have a dataset with over 2,000 rows where I need to apply this)


Task 1Ranking
Audit
0​
Complaince
2​
Testing
4​
Monitoring
Attendence
3​
Systen Check
5​
Network
1​
Technology
Desks
0​
Lighting


Thanks
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Here is one way.

23 02 28.xlsm
ABCDE
1Task 1RankingTask 1
2Audit0Audit0
3Complaince2Complaince2
4Testing4Testing4
5MonitoringMonitoring 
6Attendence3Attendence3
7Systen Check5Systen Check5
8Network1Network1
9TechnologyTechnology 
10Desks0Desks0
11LightingLighting 
Sheet2 (2)
Cell Formulas
RangeFormula
E2:E11E2=IF(VLOOKUP(D2,A$2:B$11,2,0)="","",VLOOKUP(D2,A$2:B$11,2,0))
 
Upvote 0
how about:

Book1
ABCD
1Task 1Ranking
2Audit0.00
3Complaince2.02
4Testing4.04
5Monitoring 
6Attendence3.03
7Systen Check5.05
8Network1.01
9Technology 
10Desks0.00
11Lighting 
12 
Sheet5
Cell Formulas
RangeFormula
D2:D12D2=IF(ISNUMBER(VLOOKUP(A2,$A$2:$B$11,2,0))=FALSE,"",VLOOKUP(A2,$A$2:$B$11,2,0))
 
Upvote 0
Solution
Hi Peter

Thanks for the quick response, at current I am using IFERROR with INDEX, MATCH Below). Could the IFERROR formula be edited to use the below or would I need incorporate your formula with the IF Function?

=IFERROR(INDEX('Task'!$D$10:$CZ$2296,MATCH(Task'!$C10,'Task'!$C$10:$C$2296,FALSE),MATCH('Task'!D$9,'task'!$D$9:$CZ$9,FALSE)),"")
 
Upvote 0
=IFERROR(INDEX('Task'!$D$10:$CZ$2296,MATCH(Task'!$C10,'Task'!$C$10:$C$2296,FALSE),MATCH('Task'!D$9,'task'!$D$9:$CZ$9,FALSE)),"")
What is the name of the worksheet that this formula is on?
 
Upvote 0
What is the name of the worksheet that this formula is on?
"Task" - is the name of the spreadsheet the formula is on

(for some reason the formula I provided above didn't copy over properly)

=IFERROR(INDEX('Tasks List'!$D$10:$CZ$2296,MATCH('Task'!$C10,'Tasks List'!$C$10:$C$2296,FALSE),MATCH('Task'!D$9,'Tasks List'!$D$9:$CZ$9,FALSE)),"")
 
Upvote 0
how about:

Book1
ABCD
1Task 1Ranking
2Audit0.00
3Complaince2.02
4Testing4.04
5Monitoring 
6Attendence3.03
7Systen Check5.05
8Network1.01
9Technology 
10Desks0.00
11Lighting 
12 
Sheet5
Cell Formulas
RangeFormula
D2:D12D2=IF(ISNUMBER(VLOOKUP(A2,$A$2:$B$11,2,0))=FALSE,"",VLOOKUP(A2,$A$2:$B$11,2,0))

Hi

Apologies I wasn't ignoring your message I think it came through as I was responding to Peter so thank you for replying.

I did try your method but this still seems to return me back a blank and not a 0.

Saying that I did edit my formula to incorporate Peter's formula (IF) as well and this still returned me a blank instead of a 0
 
Upvote 0
Hi

Apologies I wasn't ignoring your message I think it came through as I was responding to Peter so thank you for replying.

I did try your method but this still seems to return me back a blank and not a 0.

Saying that I did edit my formula to incorporate Peter's formula (IF) as well and this still returned me a blank instead of a 0
not sure why that is happening. As I have blanks and zeros in min workbook I posted. But, it looks like you have a solution. Which is the ultimate desire. Best wishes.
 
Upvote 0
not sure why that is happening. As I have blanks and zeros in min workbook I posted. But, it looks like you have a solution. Which is the ultimate desire. Best wishes.

Sorry for the delay I had a deadline to meet and ended up doing it manually in the end

It's strange it seems to work on another work book (working examples below) but within my initial sheet still seems to fall over. I even changed the number within a blank to check if the formula was working which it was but when changing it back to 0 no avail....Guess one of those excel things.

1677593019596.png


1677593118988.png



Thanks for your input on this none the less.
 
Upvote 0
can you post a mini workbook using the xl2bb add in?
 
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,197
Members
453,022
Latest member
RobertV1609

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
Back
Top