Macro to remove Rows that are 0, #REF!

ghp2017

Board Regular
Joined
Dec 12, 2017
Messages
51
Hello,

I am trying to create a macro that will actually remove all Rows where cell A1 has a value of 0, #REF !.
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
do you mean delete the sheet / cells if that is the only criteria
 
Upvote 0
Yes. I am working on an inventory spreadsheet and I want to completely remove and row that has a 0 or displays #REF !
 
Upvote 0
It's now Column F.
Since some of the cells are displaying #REF ! errors, I presume Column F has formulas in it.

1) Will any of the formulas be displaying the empty text string ("") or will it always be displaying only values (0 or otherwise) or #REF ! errors? If the empty text string is a possible value to display, should it be considered as a 0 and its row deleted or not?

2) When there is an error, is the only error a #REF ! error or could there be others? If there could be others, what should be done with those rows?
 
Upvote 0
I actually figured out a way to eliminate the #REF ! values. So I just need a macro assigned to a button that will delete any row that has a value of 0 in Column F.
 
Upvote 0
1) Will any of the formulas be displaying the empty text string ("") or will it always be displaying only values (0 or otherwise) or [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=REF]#REF [/URL] ! errors? If the empty text string is a possible value to display, should it be considered as a 0 and its row deleted or not?

A= #REF ! would be considered a 0

2) When there is an error, is the only error a [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=REF]#REF [/URL] ! error or could there be others? If there could be others, what should be done with those rows?

A= #REF ! error is b/c other formulas are not being calculated b/c the cells are not being used (they are extra for non-standard items {ad-hoc})
 
Upvote 0
1) Will any of the formulas be displaying the empty text string ("") or will it always be displaying only values (0 or otherwise) or [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=REF][URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=REF]#REF [/URL] [/URL] ! errors? If the empty text string is a possible value to display, should it be considered as a 0 and its row deleted or not?

A= [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=REF]#REF [/URL] ! would be considered a 0

2) When there is an error, is the only error a [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=REF][URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=REF]#REF [/URL] [/URL] ! error or could there be others? If there could be others, what should be done with those rows?

A= [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=REF]#REF [/URL] ! error is b/c other formulas are not being calculated b/c the cells are not being used (they are extra for non-standard items {ad-hoc})
You did not actually answer the questions I asked...

First off, you did not tell us the method you came up with to handle #REF ! errors.

Second, I asked if "" was a possible outcome for your formula and, if so, should it be considered as 0.

Third, I asked if other errors besides #REF ! are possible (for example #VALUE !, #N/A, etc.) and, if so, what should be done with them.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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