View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jeff Jeff is offline
external usenet poster
 
Posts: 921
Default Delete column if ....

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