Remove the zero

John Caines

Well-known Member
Joined
Aug 28, 2006
Messages
1,155
Office Version
  1. 2019
Platform
  1. Windows
Hi All.
I have a formula here that generates a number depending on the value in cell E2 which is;
Code:
=IF(ISBLANK(E2),,COUNTIF(B$7:$B13259, "*"&E2&"*")&" matches were found")

Trouble is, if cell E2 is empty, I see a zero (0) in cell H2 where the formula is :-(
Does anyone know if there is anyway to change the formula so it won't show a zero if cell E2 is empty?

PS, I know I can go into excel File/ options/advance and turn off 'Show a zero in cells that have a zero value' but I really don't want to uncheck this as it affects other cells in the sheet.

Hope there might be a way to tweak this formula so it doesn't show the zeros.

Many thanks in advance.
Hope someone can fathom it out, I just don't know the answer :-(

Best regards
John C
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
You have to specifically use "" instead of having nothing between those two adjacent commas...
Rich (BB code):
=IF(ISBLANK(E2),"",COUNTIF(B$7:$B13259, "*"&E2&"*")&" matches were found")
 
Upvote 0
Hi Rick!
Many thanks for your reply, yes ,,, that's it! Dame, I should have got that 1,,

Funny you replied as I was using a great formula by you yesterday, as I needed to go back to it, it was your 'Get Field from Delimited Text String' that's really really helpful for me.

Many thanks again Rick for your swift reply, very much appreciated!
Bank Holiday here in the UK, not sure if it's a holiday over in the US, but if it is, enjoy your Bank Holiday!

Cheers Rick
Best regards
John Caines
 
Upvote 0

Forum statistics

Threads
1,223,238
Messages
6,170,939
Members
452,368
Latest member
jayp2104

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