View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Gordon[_2_] Gordon[_2_] is offline
external usenet poster
 
Posts: 211
Default delete last line of numbers

Hi Rick...

Apologies for mixed terminology. It's much simpler than that. A block of
data is dumped in at cell A6 and goes across to column U. The data that goes
down however can go from row 6 to row 8000. The code needs to idnetify the
last line (not a gap) and then delete the last line, and nbot identify the
new last line.

Make sense!

G

"Rick Rothstein (MVP - VB)" wrote:

Where is this block of text at... In a simple String variable within your
code? In a String array within your code? In a single cell in your
worksheet? Or split up into rows (by lines) in your worksheet? Your use of
the word "import" seems to suggest it is in the worksheet somewhere, but
your use of the word "lines" instead of "rows" seems to suggest it is in a
variable somewhere. Also, you said "the last line that holds numerical
values" which suggests this "line" has more than one value in it... can you
post a sample of what that line (or row if in a worksheet) would look like
(I'm interested in how the multiple values are delimited)?

Rick


"Gordon" wrote in message
...
Hi...

I import a block of text from another sheet with a simple macro but want
to
delete the last line that holds numerical values. The block of data varies
in
depth and the line to removed can vary say from line 20 - 8000. I need
some
code that will identify when the numercial data stops and to delete the
line
on which the data appears last.

Anything out there?

Cheers

Gordon.