+ Reply to Thread
Results 1 to 8 of 8

Find string and offset copy

  1. #1
    Registered User
    Join Date
    06-06-2007
    Location
    NYC, NY
    Posts
    66

    Find string and offset copy

    Hi hi,

    I am writing a macro to do many things but one task is to find the zip code on a sheet written zip in column a and the actual 5 digit code in column b. Then copy the # and paste it on another sheet in a specific cell.

    Unfortunately the below code does not work. What is wrong with my find statement?

    Thanks,
    ~RUTH~

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    04-11-2006
    Posts
    407
    Try this:
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    or maybe

    Please Login or Register  to view this content.
    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  4. #4
    Registered User
    Join Date
    06-06-2007
    Location
    NYC, NY
    Posts
    66

    Thumbs up Thank you!

    Thanks for both your responses! VBA noob your simple 1 liner worked perfectly. I always record my macros and excel uses so many steps. It is nice to see real programing. Thanks again!

    ~RUTH~

  5. #5
    Registered User
    Join Date
    06-06-2007
    Location
    NYC, NY
    Posts
    66

    Exclamation .value vs link?

    What if instead of the value to be the same you wanted it to ref the other cell like =A1 not the value of A1.

    ~RUTH~

  6. #6
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606
    Try this, untested:

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    06-06-2007
    Location
    NYC, NY
    Posts
    66

    Unhappy Nope

    No that didn't do it. Instead it gave me an =$B$8 as text and also that ref that sheet not the sheet it came from. So even if it wasn't text the formula is wrong.

    ~RUTH~

  8. #8
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    As I also say. Post the file and tell us your expected result

    VBA Noob

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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