+ Reply to Thread
Results 1 to 3 of 3

Excel search string + offset formula help

Hybrid View

  1. #1
    Registered User
    Join Date
    05-22-2012
    Location
    Arlington, VA
    MS-Off Ver
    Excel 2003
    Posts
    2

    Excel search string + offset formula help

    This is probably a very simple formula but I'm having trouble with a search part.

    I would like to offset the cells in a particular column "D" which have the term "USA" in them one cell to the right.
    Not all the cells in this column contain this term and I don't want any other columns affected.


    With what I have searched for so far it will start with something like
    ActiveSheet.Range("D")
    And the last part of the formula will most be:
    Selection.Offset(0, 1)

    Thanks for the help.

  2. #2
    Valued Forum Contributor AlvaroSiza's Avatar
    Join Date
    09-19-2007
    Location
    Staffordshire
    MS-Off Ver
    2007
    Posts
    591

    Re: Excel search string + offset formula help

    Do you mean that if you found USA in, say D2, you want D2 to become E2? Offset is simply a way to navigate, so by saying that you want to offset one cell to right, you are really asking to move the active cell one cell to the right. Is this what you meant?
    Perhaps it was the Noid who should have avoided me...
    If you are satisfied with my solution click the small star icon on the left. Thanks
    1. Make a copy of your workbook and run the following code on your copy (just in case)
    2. With excel open, press ALT+F11 to open the Visual Basic Editor (VBE). From the "Insert" menu, select "Module".
    3. Paste the code from above into the empty white space. Close the VBE.
    4. From the developer tab, choose "Macros", select the Sub Name, and click "Run".

  3. #3
    Registered User
    Join Date
    05-22-2012
    Location
    Arlington, VA
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Excel search string + offset formula help

    That is exactly what I mean.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1