Results 1 to 4 of 4

 

Thread: Excel Macro - Locating Text In Cell

  1. #1
    changing website again...

    Status
    Offline
    Join Date
    Oct 2005
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts


    Hi All

    I'm trying to create an Excel macro that will look in a cell's contents and identify which (out of many) phrases it contains.

    For example, look in cell and see if
    =baa baa black sheep or,
    =mary's lamb or,
    =three blind mice

    are within that cell - anywhere in that cell.

    I'm sure that left, mids, right would do the job. But with the text being possibly anywhere in the cell - can't quite figure out the macro code.

    Would appreciate any assistance.

  2. #2
    Dot Com Pennyaire

    Status
    Offline
    Join Date
    Jan 2004
    Location
    this month, Guatemala
    Posts
    626
    Thanks
    0
    Thanked 0 Times in 0 Posts
    use search

    e.g. SEARCH("mary's lamb",A8,1)

    If the text is contained in the cell, it will return its position
    I used to have an open mind but my brains kept falling out.

  3. #3
    changing website again...

    Status
    Offline
    Join Date
    Oct 2005
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Cheers,

    but does this work in a macro? I can get it to work fine as a formula but can't get it to work in a macro?

    Thanks

  4. #4
    Dot Com Pennyaire

    Status
    Offline
    Join Date
    Jan 2004
    Location
    this month, Guatemala
    Posts
    626
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I don't know - maybe you can click on 'record macro', and type the code into the cell and then look at the macro to get the code?
    I used to have an open mind but my brains kept falling out.



Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. LG Chocolate
    By phones2udirect in forum Affiliate Future
    Replies: 1
    Last Post: 02-06-06, 05:39 PM
  2. LG Chocolate
    By phones2udirect in forum Affiliate Window & buy.at
    Replies: 1
    Last Post: 02-06-06, 05:38 PM
  3. Dell text link
    By will 68 in forum TradeDoubler
    Replies: 2
    Last Post: 12-08-03, 04:42 AM

Bookmarks

Posting Permissions

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

Content Relevant URLs by vBSEO 3.5.0 RC2