Mark Knecht wrote:
Hi,
   I wonder if anyone knows of a function I might use to find the row
number of the last non-blank cell in a column?

   I have data that I paste in which comes from another source.
Depending on what the other source is doing the data pasted in is
different in length. I need to automatically determine when this data
ends.
I know this is an older thread, and that you may have been able to handle your needs by using some of the ideas discussed by others. In case you are still interested, I have something of possible use.

After several false starts, I have been able to write a Macro function I call LastCell. What it does is to produce the identity of the cell that is would be reached by pressing Ctrl+End. This represents the intersection of the last column containing any entries with the last row containing any entries. This is something I need to know at times.

If I read you correctly, what you want is different. My "last row", which can be calculated via Row(LastCell(...)), is >= your "row number of the last non-blank cell in a [specified] column."

To find yours would require a few embellishments but I think it wouldn't be difficult.

A limitation is that I can only make LastCell work (or so it seems, at the moment at least) if the macro is stored in the spreadsheet file itself rather than in a library in MyMacros. This would require either copying a macro module into each file to be processed, or creating a reusable "template" file into which you could import a data file to be processed.

Iif you still have a need and this could work for you, let me know whether your "Last Row" is in fact different than mine.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@openoffice.org
For additional commands, e-mail: users-h...@openoffice.org

Reply via email to