+ Reply to Thread
Results 1 to 8 of 8

Copy Cells from Columns B to A - only IF

  1. #1
    Registered User
    Join Date
    02-06-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    6

    Question Copy Cells from Columns B to A - only IF

    Hi !

    I have two Columns A and B...where A is empty and B has values like: 715E3, 716E3, 145A2, 489U6 etc.
    I'm trying to create a Macro that would copy values of cells from [B i] to [A i] IF value on [B i] doesn't start with "7*" or "6*" (Column B is formatted as TEXT); ELSE : (if [B i] starts with "7*" or "6*" leave [A i] BLANK: MoveTo the next Cell.

    i = 1 to -End-

    I would appreciate any help !

    Thanks in Advance.

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

    Re: Copy Cells from Columns B to A - only IF

    Please attach a samplebook. Go to advance, attachment

  3. #3
    Registered User
    Join Date
    02-06-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Copy Cells from Columns B to A - only IF

    AB33,

    Products.xlsx is the spreadsheet.

    I need to copy values of Cells from column [B] (All Codes) to column A (New Codes)- ONLY if value in Column A doesn't start with "7*" or "6*". If value starts with "7*" or "6*" - it shouldn't be copied: Leave Empty.

    Thanks
    Attached Files Attached Files

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

    Re: Copy Cells from Columns B to A - only IF

    Please Login or Register  to view this content.
    Last edited by AB33; 02-06-2013 at 02:48 PM.

  5. #5
    Registered User
    Join Date
    02-06-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Copy Cells from Columns B to A - only IF

    Thank you for your prompt reply and help !

    I attached Results.xlsx - with the view of what I need to have as a result on RED font (Sheet2).
    Sheet1 - is product of the macro.

    So, example: if there is a Value like '7*' on B49 - I just need to leave A49 blank...and look for other cells/values.
    It looks like I need a variable that increments A, each time B increments ?
    Attached Files Attached Files

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

    Re: Copy Cells from Columns B to A - only IF

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    02-06-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Copy Cells from Columns B to A - only IF

    Awesome ! Works great :D Thanks a lot !

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

    Re: Copy Cells from Columns B to A - only IF

    You are welcome!
    Please close now this thread . Go in to the top right-hand side of this page, choose "Thread Tools", select closed from the drop down menu.

+ 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