Cell returns 0 if blank.

dave2017

New Member
Joined
Jan 4, 2017
Messages
13
Office Version
  1. 2019
Platform
  1. Windows
Hi,

I have the below formula that works however if a cell is blank it returns a 0, so is possible to have it return a blank if the cell is blank ?

=IFERROR(INDEX('Paste From Compile'!B:B,SMALL(IF('Paste From Compile'!$M$4:$M$100>0,ROW('Paste From Compile'!$M$4:$M$100),""),ROW('Site Sheet'!B3))),"")

Iam using Ms office 2019 home and business on Windows pro 10.

Thanks David
 
Paste from compile image shows ...
But it doesn't show any cells that contain numbers only. Are you sure there are some such cells in col B in that sheet?
If not, the formula I suggested above can be made simpler.
 
Upvote 0

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Then try this

Excel Formula:
=IF(INDEX('Paste From Compile'!B:B,SMALL(IF('Paste From Compile'!$M$4:$M$10>0,ROW('Paste From Compile'!$M$4:$M$10),""),ROW('Site Sheet'!B3)))="","",
INDEX('Paste From Compile'!B:B,SMALL(IF('Paste From Compile'!$M$4:$M$10>0,ROW('Paste From Compile'!$M$4:$M$10),""),ROW('Site Sheet'!B3))))
Peter

That worked perfect thanks, now it shows an error in column b from b8:b16 after I copied the formula down.
 

Attachments

  • Site sheet 2.JPG
    Site sheet 2.JPG
    86.1 KB · Views: 1
Upvote 0
Sorry, I reduced the range size (Changed $100 to $10) in your original formula to make it easier for checking & forgot to reinstate the original value. Here I have changed it back. Does that help?

Excel Formula:
=IF(INDEX('Paste From Compile'!B:B,SMALL(IF('Paste From Compile'!$M$4:$M$100>0,ROW('Paste From Compile'!$M$4:$M$100),""),ROW('Site Sheet'!B3)))="","",
INDEX('Paste From Compile'!B:B,SMALL(IF('Paste From Compile'!$M$4:$M$100>0,ROW('Paste From Compile'!$M$4:$M$100),""),ROW('Site Sheet'!B3))))
 
Upvote 0
Sorry, I reduced the range size (Changed $100 to $10) in your original formula to make it easier for checking & forgot to reinstate the original value. Here I have changed it back. Does that help?

Excel Formula:
=IF(INDEX('Paste From Compile'!B:B,SMALL(IF('Paste From Compile'!$M$4:$M$100>0,ROW('Paste From Compile'!$M$4:$M$100),""),ROW('Site Sheet'!B3)))="","",
INDEX('Paste From Compile'!B:B,SMALL(IF('Paste From Compile'!$M$4:$M$100>0,ROW('Paste From Compile'!$M$4:$M$100),""),ROW('Site Sheet'!B3))))
Hi Peter,

Still shows the #NUM! Error, possibly because there is no data on the paste from compile sheet from column B row 9 onwards ?
 
Upvote 0
Excel Formula:
=IFERROR(IF(INDEX('Paste From Compile'!B:B,SMALL(IF('Paste From Compile'!$M$4:$M$100>0,ROW('Paste From Compile'!$M$4:$M$100),""),ROW('Site Sheet'!B3)))="","",
INDEX('Paste From Compile'!B:B,SMALL(IF('Paste From Compile'!$M$4:$M$100>0,ROW('Paste From Compile'!$M$4:$M$100),""),ROW('Site Sheet'!B3)))),"")
 
Upvote 0
Solution
Excel Formula:
=IFERROR(IF(INDEX('Paste From Compile'!B:B,SMALL(IF('Paste From Compile'!$M$4:$M$100>0,ROW('Paste From Compile'!$M$4:$M$100),""),ROW('Site Sheet'!B3)))="","",
INDEX('Paste From Compile'!B:B,SMALL(IF('Paste From Compile'!$M$4:$M$100>0,ROW('Paste From Compile'!$M$4:$M$100),""),ROW('Site Sheet'!B3)))),"")
Hi Peter,

That's it ! Perfect, you are a superstar. Thanks for the solution and time you have provided.

David
 
Upvote 0
You're welcome.

For the future, usually faster to the correct answer if we can have the small sample dummy data with XL2BB so I suggest that you investigate that.
 
Upvote 0

Forum statistics

Threads
1,215,053
Messages
6,122,882
Members
449,097
Latest member
dbomb1414

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