Dear all,
I'm trying to loop across row 2 (in my test file attached) and identify when the cell value is NA (as in cell J2). I want to identify it to be able to delete the column but am having trouble writing the correct code to do this (my latest attempts isattached as text and in the file). Can anybody point me in the right direction?
thanks,
neil
Test File.xlsm![]()
Dim WSD As Worksheet 'Object variables available throughout this module Dim FinalCol As Single Sub Macro3() Dim StrTitle As String FinalCol = ActiveSheet.Cells(3, Application.Columns.Count).End(xlToLeft).Column For i = 1 To FinalCol Cells(2, i).Select StrTitle = ActiveCell.Value ' MsgBox StrTitle ActiveCell.Value = "= IF(ISNA(StrTitle),""blank"", StrTitle)" Next i End Sub
Bookmarks