Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 410
Default Find Last Occurence in a Range with VBA

I am using find to get the first address of occurences in a row, but
how do you get the last occurence?

Thanks,
Jay
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,441
Default Find Last Occurence in a Range with VBA

Jay,

Dim myC As Range
Set myC = Range("A2:A100").Find("Jay", , , , , xlPrevious)
MsgBox myC.Address

HTH,
Bernie
MS Excel MVP



"jlclyde" wrote in message
...
I am using find to get the first address of occurences in a row, but
how do you get the last occurence?

Thanks,
Jay



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 410
Default Find Last Occurence in a Range with VBA

On Sep 30, 5:17*pm, "Bernie Deitrick" <deitbe @ consumer dot org
wrote:
Jay,

Dim myC As Range
Set myC = Range("A2:A100").Find("Jay", , , , , xlPrevious)
MsgBox myC.Address

HTH,
Bernie
MS Excel MVP

"jlclyde" wrote in message

...



I am using find to get the first address of occurences in a row, but
how do you get the last occurence?


Thanks,
Jay- Hide quoted text -


- Show quoted text -


This was not what I was thinking but this will do nicely.
Thanks,
Jay
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find first occurence of a number in an array 7 cols wide Ricardo-SA Excel Worksheet Functions 3 April 5th 08 11:22 PM
Trying to FIND lowercase or uppercase of target occurence u473 Excel Worksheet Functions 3 August 23rd 07 11:08 PM
Find first occurence in a list that's greater than a specific num stevep Excel Worksheet Functions 2 December 9th 05 08:41 PM
Find dates in a range; then sum values in that range by a criteria Anders Excel Discussion (Misc queries) 4 October 21st 05 03:41 PM
I need to count the occurence of text in a range of cells (which . Brenda Excel Worksheet Functions 1 December 12th 04 09:00 PM


All times are GMT +1. The time now is 10:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"