Find Cell
VBA Telemetry pings you when your VBA projects fail
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: Find Cell

  1. #1
    Board Regular
    Join Date
    Feb 2002
    Location
    Los Angeles, CA
    Posts
    752
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    This has to do with my earlier post which Al helped me with but I have one small problem.

    The macro looks for a cell with only the word Total in it, my problem is that Total is the last word in the following options.

    City Total
    State Total
    Zip Code Total

    How would I change the command below to select any of the 3 words which all contain the word Total?

    If (cell.Value) = "Total" Then

    Thanks

  2. #2
    MrExcel MVP Al Chara's Avatar
    Join Date
    Feb 2002
    Location
    Newark, Delaware
    Posts
    1,701
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Use:
    If right(cell.Value,5) = "Total" Then


    _________________
    Hope this helps.
    Kind regards, Al.

    [ This Message was edited by: Al Chara on 2002-04-17 15:37 ]

  3. #3
    MrExcel MVP
    Join Date
    Mar 2002
    Location
    Michigan USA
    Posts
    11,454
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-04-17 15:32, Parra wrote:
    This has to do with my earlier post which Al helped me with but I have one small problem.

    The macro looks for a cell with only the word Total in it, my problem is that Total is the last word in the following options.

    City Total
    State Total
    Zip Code Total

    How would I change the command below to select any of the 3 words which all contain the word Total?

    If (cell.Value) = "Total" Then

    Thanks
    You could use the lookup value to be

    =right(CellName,5) to pick up Total that consists of 5 characters in the extreme right location in that cell!

  4. #4
    MrExcel MVP
    Join Date
    Mar 2002
    Location
    Michigan USA
    Posts
    11,454
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Sorry, Al:
    I did not see your post ... mine probably went in right after yours!

  5. #5
    Board Regular
    Join Date
    Feb 2002
    Location
    Los Angeles, CA
    Posts
    752
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Yeah! Thats exactly what I needed it to do.

    Al, Thanks a lot

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com