View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Martin Martin is offline
external usenet poster
 
Posts: 336
Default Check values in each column

Hi

I want to check the value of row 2 in each column and if it = "#N/A" then
delete the column. I have got this far but it doesn't wuite work. Can
anyone help?

For iColumn = 1 To 256
If Cells(2, iColumn).Value = "#N/A" Then
Columns(iColumn).EntireColumn.Delete
Next iColumn

Thanks in advance