+ Reply to Thread
Results 1 to 17 of 17

Multiple values into seperate cells. excel masters please.

  1. #1
    Registered User
    Join Date
    04-15-2013
    Location
    florida
    MS-Off Ver
    Excel 2010
    Posts
    9

    Multiple values into seperate cells. excel masters please.

    a1 has a value
    c1 has a formula
    d1 associated numbers
    e1 c1 fomula
    f1 c2 formula
    g1 c3 formula

    example
    a1=1 c1="*"&A1&"*" d=1,2,3 e(I want e to populate d1 the 1) f(I want to populate d1 the 2) and g(I want to populate d1 the 3)

  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: Multiple values into seperate cells. excel masters please.

    To best describe or illustrate your problem you would be better off attaching a dummy workbook. The workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    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
    Registered User
    Join Date
    04-15-2013
    Location
    florida
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Multiple values into seperate cells. excel masters please.

    Sample attached.
    Attached Files Attached Files

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Multiple values into seperate cells. excel masters please.

    If cell D2 is just a concatenation of the values in A2:A4 then try this formula entered in E2 and copied across:

    =INDEX($A2:$A4,COLUMNS($E2:E2))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Registered User
    Join Date
    04-15-2013
    Location
    florida
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Multiple values into seperate cells. excel masters please.

    Sadly it's not, d2 is a variable it just so happens 1,2,3 is there for the sample, so I need it to look at the 1,2,3 and if it said 1,2,89 that it would populate 89 value in g2 instead.

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Multiple values into seperate cells. excel masters please.

    As long as there aren't too many numbers in the cell...

    Entered in E2 and copied across:

    =--TRIM(MID(SUBSTITUTE(","&$D2,",",REPT(" ",255)),COLUMNS($E2:E2)*255,255))

  7. #7
    Registered User
    Join Date
    04-15-2013
    Location
    florida
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Multiple values into seperate cells. excel masters please.

    Wow that works the only thing left is I need the formula to be written like this "*"&A2&"*" it's a upc

  8. #8
    Registered User
    Join Date
    04-15-2013
    Location
    florida
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Multiple values into seperate cells. excel masters please.

    So I need it to take the d2 number and insert it into this formula "*"&A2&"*" (with A2 being the d2 1,2,3)

  9. #9
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Multiple values into seperate cells. excel masters please.

    Sorry, I don't understand.

    If D2 contains: 1,2,3

    What result should be in E2?

    What result should be in F2?

    What result should be in G2?

  10. #10
    Registered User
    Join Date
    04-15-2013
    Location
    florida
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Multiple values into seperate cells. excel masters please.

    ah the result in e2 should be "*"&d2(1,2,or3)&"*"

  11. #11
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Multiple values into seperate cells. excel masters please.

    If D2 = 1,2,3 and you want:

    E2: *1*
    F2: *2*
    G2: *3*

    This formula entered in E2 and copied across:

    ="*"&TRIM(MID(SUBSTITUTE(","&$D2,",",REPT(" ",255)),COLUMNS($E2:E2)*255,255))&"*"

  12. #12
    Registered User
    Join Date
    04-15-2013
    Location
    florida
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Multiple values into seperate cells. excel masters please.

    Bingo! last issue, so f2 has 2,3
    g will show *2*
    h will show *3*
    I shows **
    J shows **
    K shows **
    Is there a way to blank it out if there is no value, I have tried conditional formatting but that didn't work.

  13. #13
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Multiple values into seperate cells. excel masters please.

    A couple of questions:

    Will the cell ever be empty?

    If the cell is not empty, will it ALWAYS contain at least 2 numbers separated by a comma? Will there ever be just a sinlge number and no commas?

  14. #14
    Registered User
    Join Date
    04-15-2013
    Location
    florida
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Multiple values into seperate cells. excel masters please.

    The cell can be empty, if there are no associated barcodes. And yes there are times it will contain 1 number

    so the cell can be empty, 1 number, 2 numbers, 3 numbers, up to 6

  15. #15
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Multiple values into seperate cells. excel masters please.

    Try this...

    =SUBSTITUTE("*"&TRIM(MID(SUBSTITUTE(","&$D2,",",
    REPT(" ",255)),COLUMNS($E2:E2)*255,255))&"*","**","")

  16. #16
    Registered User
    Join Date
    04-15-2013
    Location
    florida
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Multiple values into seperate cells. excel masters please.

    Solved! thank You!

  17. #17
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Multiple values into seperate cells. excel masters please.

    You're welcome. Thanks for the feedback!

+ 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