+ Reply to Thread
Results 1 to 7 of 7

If then?

  1. #1
    Registered User
    Join Date
    03-21-2013
    Location
    California, USA
    MS-Off Ver
    Excel 2003
    Posts
    46

    If then?

    In one of 2 columns of data I have what starts out as 3 digit codes, such as WTA PAA PRK LFF all in the same cell, and use a macro to change those three letters into something a bit easier to read.

    Please Login or Register  to view this content.
    What I would like to be able to accomplish is making the above dependent on what is in the cell next to it, meaning if A1 is "36" and I have "WTA" in A2 then "WTA" would be replaced with "BASIC CODE"; however if in A1 I have "39" and "WTA" in A2 then I would want "WTA" to be replaced with "BASIC CODE OPTION 3".

    Thank you.

    Moderators note: code tags added for you - this time
    Last edited by FDibbins; 10-06-2013 at 08:19 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: If then?

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: If then?

    To attach a Workbook
    (please do not post pictures of worksheets)
    • Click Advanced (next to quick post),
    • Scroll down until you see "Manage Attachments",
    • Click that then select "add files" (top right corner).
    • Click "Select Files" find your file, click "open" click "upload"
    • Once the upload is completed the file name will appear below the input boxes in this window.
    • Click "Done" at bottom right to close the Attachment Manager.
    • Click "Submit Reply"
    With codes and replacements sheet
    Ben Van Johnson

  4. #4
    Registered User
    Join Date
    03-21-2013
    Location
    California, USA
    MS-Off Ver
    Excel 2003
    Posts
    46

    Re: If then?

    Quote Originally Posted by FDibbins View Post
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
    Sorry about that, thank you for fixing it.

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: If then?

    Maybe something like this can get you started?

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    03-21-2013
    Location
    California, USA
    MS-Off Ver
    Excel 2003
    Posts
    46

    Re: If then?

    Quote Originally Posted by protonLeah View Post
    To attach a Workbook
    (please do not post pictures of worksheets)
    • Click Advanced (next to quick post),
    • Scroll down until you see "Manage Attachments",
    • Click that then select "add files" (top right corner).
    • Click "Select Files" find your file, click "open" click "upload"
    • Once the upload is completed the file name will appear below the input boxes in this window.
    • Click "Done" at bottom right to close the Attachment Manager.
    • Click "Submit Reply"
    With codes and replacements sheet
    I've uploaded it. Thank you.

    test.xlsm

  7. #7
    Registered User
    Join Date
    03-21-2013
    Location
    California, USA
    MS-Off Ver
    Excel 2003
    Posts
    46

    Re: If then?

    Quote Originally Posted by JOHN H. DAVIS View Post
    Maybe something like this can get you started?

    Please Login or Register  to view this content.
    Thank you for the suggestion. I tried it out, it looks like perhaps it is only going to work based on one cell and not all. Typically I'll have 100 or more that need to be converted.

+ 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