View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
maninashed maninashed is offline
external usenet poster
 
Posts: 2
Default An old chestnut: finding the last cell in a range

On 4 Oct, 14:26, Mike H wrote:
Don't multi post, you have an answer in your other post in worksheet functions



"Mark Hanley" wrote:
I am trying to find the last occupied cell in a range. I have tried
every different method that I have found in this group and others but
none seem to work for me.


I have a range in which values are copied from another sheet with a
formula like: =IF('Data entry'!A19<"",'Data entry'!A19,"")


This formula will copy the contents of the cell in the 'Data entry'
sheet if it is non-empty, otherwise it will place 'nothing' in the
cell.


My problem is that all of the 'find last occupied cell' routines I
have used refuse to see this cell as being unoccupied.


One thing I have tried is to create a column which has an =IF()
formula in it which counts how many cells have values in a given row
and if it is more than zero then it puts a 'Y' in that row. I then do
a Range.Search on that column to find the last occurance of 'Y'. Even
this won't work! It simply highlights the last cell in that column
with the =IF() formula in it - regardless of whether it has 'Y' in it
or not.


Any help gratefully appreciated.


Mark


Actually I didn't multi-post. I created two separate posts (albeit
with *almost* identical content).

I posted a very similar message to this group after I found it and
considered that it was more suited to my problem. By the time I had
finished the post to this group I had received replies from the other
group.

As it is, I found a solution that worked from the formulas group:
http://groups.google.co.uk/group/mic...5adaad0?hl=en#

Thank you to everybody who took the time to reply.