+ Reply to Thread
Results 1 to 20 of 20

Link together different cells in specific order?

  1. #1
    Registered User
    Join Date
    05-29-2007
    Posts
    40

    Link together different cells in specific order?

    Hi all,

    I have a list of terms to put together and what I have is a master list of 6 concatenate functions and I need to link them to all the different words in my list.
    The first word in collumn A needs to be with the function in D1, the second word (A2) needs to be with D2, then A3 with D1, and A4 also with D1, while A5 with D6, etc.
    It looks something like this:
    for your info...I have put numbers in the adjacent cell corresponding to which of the 6 concatenate functions need to go into the cell in collumn C

    So in reality all I need is a function that would rearrange my list of 6 functions from Collumn D into collumn C based on the numbers 1-6 I have in collumn B

    Workbook.txt

    (attached is an example to better see what im talking about. Disregard that the concatenate functions are not working...it doesnt matter right now.)



    I hope that makes sense it is a bit hard to explain but let me know if you don't quite understand.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    I don't understand at all. can you post a workbook with a sample of source data and expected output?

  3. #3
    Registered User
    Join Date
    05-29-2007
    Posts
    40

    I was affraid of that

    As I read over what I posted I cringed at how hard it is to explain. I thought that the linked attachment would help. It is the outcome. In collumn A are sample terms that I have. In collumn D are the 6 functions. Collumn B are the numbers 1-6 that correspond to which I want.... 1 meaning D1, 2 meaning D2, 3 meaning D3, and so on.

    Basically once again I am trying to find a function that may be an if then. If the number 5 is in B1 then D5 needs to show up in C1. If the number 1 is in B26 then what is in D1 needs to show up in C26. If the number 3 is in B27 then what is in D3 needs to show up in C27...is that clearer?

    Workbook.xls.zip

    I hope that the attachment works this time...i dont know why i put it in .txt the first time.

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Can't open your attachment.

    Is it a 2007 xl file

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  5. #5
    Registered User
    Join Date
    05-29-2007
    Posts
    40
    Well it is supposedly a default excel file format....hmmm its not 2007 either.

    Lets try once more

    Workbook 2.htm.zip

  6. #6
    Registered User
    Join Date
    05-29-2007
    Posts
    40
    Lol i did because you couldnt see what I had posted last time....gees I was trying to find some common ground just so you could see what I was talking about not get the excel user all in a huff cause I used another format. Ill try the excel sheet again but if it doesn't work there isn't much else I can do then some other more universal format.

    Workbook 2.xls.zip

  7. #7
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    I could open the htm file but not the mac excel file

    Amended
    So what do you mean by function ??

    A B C D
    Barbecue & Grill 2 Function 1
    Fences & Gates 2 Function 2
    Firewood Sales 3 Function 3
    Garden Ponds 2 Function 4
    Gardening 5 Function 5
    Landscaping 3 Function 6
    Lawn & Garden Equipment 2
    Lawn & Garden Retailers 6
    Nurseries & Greenhouses 6
    Other Lawn & Garden Services 6
    Playground Equipment 2





    A B C D
    Barbecue & Grill 2 Function 2 Function 1
    Fences & Gates 2 Function 2 Function 2
    Firewood Sales 3 Function 3 Function 3
    Garden Ponds 2 Function 2 Function 4
    Gardening 5 Function 5 Function 5
    Landscaping 3 Function 3 Function 6
    Lawn & Garden Equipment 2 Function 2
    Lawn & Garden Retailers 6 Function 6
    Nurseries & Greenhouses 6 Function 6
    Other Lawn & Garden Services 6 Function 6
    Playground Equipment 2 Function 2
    VBA Noob
    Last edited by VBA Noob; 12-31-2007 at 06:05 PM.

  8. #8
    Registered User
    Join Date
    05-29-2007
    Posts
    40
    What i am looking for has to be easy to do for you guys I just cant explain it very well with words.

    forget about the attachment if it doesnt work and ill try and explain it once more as simply as possible cause it really is something simple i think.

    I want what is in cell D1 to show up in collumn E (lets just say) every time, and in the same row, that a number 1 shows up in collumn C. This is the same for the number 2, every time it shows up in collumn C, I want D2 to show up in the same row in collumn E.
    PHP Code: 
      C             D                E  
    2                              Func 1    
    3                              Func 2
    2                              Func 3
    5                              Func 4
    1                              Func 5
    6                              Func 6
    6
    2
    4



      C             D                   E  
    2            Func 2              Func 1    
    3            Func 3              Func 2
    2            Func 2              Func 3
    5            Func 5              Func 4
    1            Func 1              Func 5
    6            Func 6              Func 6
    6            Func 6
    2            Func 2
    4            Func 4 
    Something like that........?
    i know this isnt what that wrap is for but im trying whatever I can..

    thanks guys

  9. #9
    Registered User
    Join Date
    05-29-2007
    Posts
    40
    lol

    The exact information isnt what im interested in nor important but just the concept.... but here it is anyways

    Workbook 2.xls.zip

  10. #10
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Think I've figured out what you want

    try this in C2 and drag down

    =OFFSET($D$1,B2,0)
    Amended

    or

    =OFFSET($D$1,B2,0)&" "&A2
    VBA Noob
    Last edited by VBA Noob; 12-31-2007 at 06:54 PM.

  11. #11
    Registered User
    Join Date
    05-29-2007
    Posts
    40
    perfect...
    now my question is, is there a way to conserve the concatenate function when sending it over using an offset? Becuase at the moment it comes over as a value of an offset function and no longer acts like a concatenate function which is what i need....I didnt put that in the spreadsheet I sent and I apologize but those 6 terms are actually concatenate functions that once placed according like you have already shown need to then "splice" if you will, with the A collumn.

    The 6 are as follows:
    (this is what they will be once in collumn C)

    =CONCATENATE(A1,"for Hire Near Tampa Bay")
    =CONCATENATE(A2,"for Sale Near Tampa Bay")
    =CONCATENATE("Places that Offer"," ",A3,"Near Tampa Bay")
    =CONCATENATE("Find Companies that Offer"," ",A4,"Near Tampa Bay")
    =CONCATENATE(A5,"Sales & Services Near Tampa Bay")
    =CONCATENATE("Find"," ",A6,"Near Tampa Bay")

  12. #12
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    You've lost me again.

    Can you post a proper example with end results

    VBA Noob

  13. #13
    Registered User
    Join Date
    05-29-2007
    Posts
    40
    I changed it a bit to work better but this is what im looking for
    =OFFSET($F$1,B1,0)
    is what i used....but it turns the functions into just text and doesn't do what I want here.

    The attached has the after how I want it with the actual concatenate function still intact and working.


    Workbook 2.xls.zip

    P.S. I moved the functions over just so it wouldnt pick up anything from 2 collumns over since that is what it is set to do.....

  14. #14
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Try

    =A1&" "&OFFSET($F$1,B1,0)
    VBA Noob

  15. #15
    Registered User
    Join Date
    05-29-2007
    Posts
    40

    Thumbs up Amazing

    Thank you but I just realized that the problem is still evident. If you notice that the second is "Places that Offer _______ Near Tampa Bay".
    So it can't just be added to the beginning, it must be plugged into that specific place of the phrase which is how I have the concatenate set up.
    Maybe this is more a job for a macro and not a function.....hmmmm
    Last edited by Sandman4432; 01-01-2008 at 11:11 AM.

  16. #16
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Please read forum rules and message to cross posters below and then add the link to the cross post

    VBA Noob

  17. #17
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    See if this helps

    =IF(B1=3,LEFT(OFFSET($F$1,B1,0),17)&" "&A1&MID(OFFSET($F$1,B1,0),18,999),IF(B1=6,LEFT(OFFSET($F$1,B1,0),4)&" "&A1&" "&MID(OFFSET($F$1,B1,0),6,999),A1&""&OFFSET($F$1,B1,0)))
    or

    =IF(B1=3,"Places that Offer "&A1&" Near Tampa Bay",IF(B1=6,"Find "&A1&" Near Tampa Bay",A1&""&OFFSET($F$1,B1,0)))
    VBA Noob
    Last edited by VBA Noob; 01-01-2008 at 12:42 PM.

  18. #18
    Registered User
    Join Date
    05-29-2007
    Posts
    40
    great.

    That is it. This also helped because now I understand IF functions a little more now. Just so you know I made some corrections because my 4th term was also like 3 and 6 but no worries I was able to figure it all out and make it work beautifully thanks to you.

    Happy New Year.

  19. #19
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    See if the results on sheet2 get you there.

    =grouper(A1,B1,$F$2:$F$7)
    Please Login or Register  to view this content.
    rylo
    Attached Files Attached Files
    Last edited by VBA Noob; 01-01-2008 at 06:38 PM.

  20. #20
    Forum Expert
    Join Date
    09-09-2005
    Location
    England
    MS-Off Ver
    2007
    Posts
    1,500
    You just need to extend aprevious answer, putting the text in 2 columns, one for the text you want inserting before before and the second for the text after. Hopefully the attached helps. The VBA solution above is another way but depends if you want to go down the vba route

    Regards

    Dav
    Attached Files Attached Files
    Last edited by Dav; 01-03-2008 at 05:09 AM.

+ 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