-3

I'm not a coder, but I generally accomplish my goals looking for similar situations on forums.

I've found some similar answers to my question, but regarding worksheets, but I couldn't manage to make it work with tables.

I have a table Called "Storage” that is populated with data called from a VBA. In this table there is a column named "BACKEND_STORAGE”, that sometimes come with "#N/A”. I'd like to delete entire rows where column “BACKEND_STORAGE” column has a value of “#N/A”, and leave rows where there is data at this column. Sometimes there are no rows with "#N/A” values, so nothing should be done.

Can anyone point me in the right direction? I've found something similar, but pointing to Worksheet instead of table in the link below.

Table Example:

ESX_CLUSTER VM BACKEND_STORAGE
CCDB-03 SRVLNX01 6000144000000010307d6f1542453
CCDB-03 SRVLNX01 6000144000000010307d6f1542454
CCDB-03 SRVLNX01 #N/A

Thanks!

I've tried what I've found in this thread, but couldn't manage it to work.

Delete Row based on Search Key VBA

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459

1 Answers1

0

The answer given by Tim Williams on the thread you have referred should work with a little change. Since #N/A is interpreted by Excel as error, you may want to change the if condition

if .value = "X"

by

IsError(Range("A" & i))

assuming your column A has the #N/A values.

Rishi Mehta
  • 399
  • 3
  • 10
  • Thanks for the great addition. Better than looking for N/A, once opening in a different language bugs, but I'm using a table instead of a worksheet. I would like to filter inside the table. Anyone? – Joao Thomeo Neto Jul 31 '19 at 15:00