+ Reply to Thread
Results 1 to 6 of 6

If specific value is found swap the value of two cells

  1. #1
    Forum Contributor
    Join Date
    07-31-2012
    Location
    Los Angeles, USA
    MS-Off Ver
    2003, 2010, 365
    Posts
    320

    If specific value is found swap the value of two cells

    Hi,

    This is what I need, I have attached a excel 2003 file named test.xls that if the VBA finds the value 121 in the SHIP_TO_CODE column then for that row I want to swap the values in REFORDERNO and PRODUCTID.
    An example of the expected file after running the VBA is also attached and I have highlighted the changes in that file.

    Thanks for any help,

    David
    Attached Files Attached Files
    Last edited by djfscouse; 06-19-2013 at 11:01 AM.

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: If specific value is found swap the value of two cells

    Wrong code
    Last edited by AB33; 06-19-2013 at 10:39 AM.

  3. #3
    Forum Contributor
    Join Date
    07-31-2012
    Location
    Los Angeles, USA
    MS-Off Ver
    2003, 2010, 365
    Posts
    320

    Re: If specific value is found swap the value of two cells

    Wrong code?

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: If specific value is found swap the value of two cells

    After I posted the code, I realised it does not give you the correct result.
    Sorry!

  5. #5
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: If specific value is found swap the value of two cells

    This time, I have got it.

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    07-31-2012
    Location
    Los Angeles, USA
    MS-Off Ver
    2003, 2010, 365
    Posts
    320

    Re: If specific value is found swap the value of two cells

    Thanks AB33 it worked great!

+ 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