+ Reply to Thread
Results 1 to 4 of 4

Copy cell values based on criteria into new column, please help!

  1. #1
    Registered User
    Join Date
    02-06-2013
    Location
    Michigan
    MS-Off Ver
    Excel 2010
    Posts
    3

    Copy cell values based on criteria into new column, please help!

    Hi everyone!

    I am working on this spreadsheet (I attached an example below). I want to see if there is a way for excel to copy all the 7 digit codes into the 7 digit column, 8 digit codes into 8 digit column, and so on.

    I tried using advanced filter and lookups but to no success. The sheet currently reads column B "Codes" and returns the amount of digits to column C "#Digits", I thought that might be helpful but I can't figure out what to do now. Any help would be very appreciated!

    Thanks again!

    Code Help.xlsx

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Copy cell values based on criteria into new column, please help!

    hi avoss, welcome to the forum. for columns E to G, try this array formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    in column H, try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    or without depending on column C, try this for E to G:
    =IFERROR(INDEX($B$2:$B$20,SMALL(IF(LEN($B$2:$B$20)=(LEFT(E$1,FIND(" ",E$1)-1))+0,ROW($B$2:$B$20)-ROW($B$2)+1),ROWS(E$2:E2))),"")

    and for H:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    **for all these formulas, you have to paste the formula inside the formula bar & press CTRL + SHIFT + ENTER. When done correctly, you should see curly brackets surrounding it

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

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

    Re: Copy cell values based on criteria into new column, please help!

    Thank you so much for your help benishiryo! The formula works for column E and column H, but when I use the formula in F and G it returns the 7 digit values that are in column E. Do you know how I can fix this?

    Thanks again!

  4. #4
    Registered User
    Join Date
    02-06-2013
    Location
    Michigan
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Copy cell values based on criteria into new column, please help!

    Nevermind! I figure it out

+ 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