Delete column if ....
PERFECT!
"Tom Ogilvy" wrote:
Sub CreateandMoveDate()
Dim lastcol as Long, i as Long
' current code
' activatesheet where you want to delete data
' for illustration, assume it is named "data"
worksheets("Data").Activate
lastcol = cells(10,256).End(xlToLeft).Column
for i = lastcol to 1 step -1
if isnumeric(cells(10,i)) then
if cells(10,i) < 1 then
columns(i).Delete
end if
end if
Next i
End Sub
would be my guess
--
"JEFF" wrote in message
...
Sorry.... I start with some flat data, move it around and reformat (did
it
manually while recording the macro). At this point, I would then like to
delete the columns fitting the criteria below...
Does that help?
"Tom Ogilvy" wrote:
It would really be hard to say without knowing exactly what the
situation
is.
--
Regards,
Tom Ogilvy
"JEFF" wrote in message
...
Thanks for the response... one more basic question:
What if I am moving and formatting the data first, then I want to
delete
these columns.... How/where do I place this?
"Tom Ogilvy" wrote:
Dim lastcol as Long, i as Long
lastcol = cells(10,256).End(xlToLeft).Column
for i = lastcol to 1 step -1
if isnumeric(cells(10,i)) then
if cells(10,i) < 1 then
columns(i).Delete
end if
end if
Next
--
Regards,
Tom Ogilvy
"JEFF" wrote in message
...
Hi,
I'd like to have my VBA delete those columns where the cell
content of
row
10 of that same column <1....
Help?! TIA
|