+ Reply to Thread
Results 1 to 14 of 14

Pick info from Multiple Columns & rows from Unique value

  1. #1
    Registered User
    Join Date
    07-14-2012
    Location
    Lisboa, Portugal
    MS-Off Ver
    Excel 2007
    Posts
    24

    Pick info from Multiple Columns & rows from Unique value

    Hello and good day to all

    I don't know if i can explain this correctly but here it goes.

    In the attachment below, on the first column ia have a number that appears repeated various times because it has multiple phone number associated, which can be seen in the next columns, and what i really wanted to know is if there's a way to have only one unique value on the first column but have all the phone number associated in the same row.

    My english is not the best so i don't know if i'm being clear about what i want

    Hopefully the attachment can do a better job

    contactos_alternativos(3).xls


    Thanks in advance

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Pick info from Multiple Columns & rows from Unique value

    Hi.

    Your profile says Excel 2007, but you've attached a 2003 sheet.

    Can you clarify whether this solution needs to be compatible with 2003?

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Registered User
    Join Date
    07-14-2012
    Location
    Lisboa, Portugal
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: Pick info from Multiple Columns & rows from Unique value

    Sorry it was just the format in which the file was exported from a website we have

    No it doesn't have to be compatible with 2003

    I'm using 2007 and here's the attachment again

    contactos_alternativos(3).xlsb

    Thanks for the reply

  4. #4
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Pick info from Multiple Columns & rows from Unique value

    I'd do it this way:

    First go to Name Manager and define:

    Name: ID_NIC
    Refers to: =$A$2:$A$20

    Name: Contacts
    Refers to: =$B$2:$H$20

    Name: Arry1
    Refers to: =1+(INT((ROW(INDEX($A:$A,1):INDEX($A:$A,ROWS(Contacts)*COLUMNS(Contacts)))-1)/COLUMNS(Contacts)))

    Name: Arry2
    Refers to: =1+(MOD((ROW(INDEX($A:$A,1):INDEX($A:$A,ROWS(Contacts)*COLUMNS(Contacts)))-1),COLUMNS(Contacts)))

    The formula in cell A25 is then:

    =IFERROR(SMALL(IF(FREQUENCY(ID_NIC,ID_NIC),ID_NIC),ROWS($1:1)),"")

    Copy down until you start to get blanks for the results.

    And the array formula** in B25 is:

    =IF(A25="","",IFERROR(SMALL(IF(FREQUENCY(IF(ID_NIC=$A25,IF(Contacts<>"",0+(Contacts&0))),0+(Contacts&0)),INDEX(Contacts,N(IF(1,Arry1)),N(IF(1,Arry2)))),COLUMNS($A:A)),""))

    Copy across and down until you start to get blanks for the results.

    Regards


    **Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).

  5. #5
    Registered User
    Join Date
    07-14-2012
    Location
    Lisboa, Portugal
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: Pick info from Multiple Columns & rows from Unique value

    Thank you so much it was exactly what I was after

    There are some formulas which I've never used before so before starting to uses this on regular basis i'll try to understand it completly first

    Thanks again for the quick and helpful reply

  6. #6
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Pick info from Multiple Columns & rows from Unique value

    You're very welcome!

    If you need any help understanding any parts of this construction then just reply in the thread and I'll do my best to explain.

    Cheers

  7. #7
    Registered User
    Join Date
    07-14-2012
    Location
    Lisboa, Portugal
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: Pick info from Multiple Columns & rows from Unique value

    I have one question maybe you can help me with

    See the value below

    Name: ID_NIC
    Refers to: =$A$2:$A$20

    If i try to expand the range for example to =$A$2:$A$21 but the cell A21 is empty the rest of the code only return blank values

    Do you know why? is there a way to define for example the range $A$2:To last Value?


    Thanks for the patience

  8. #8
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Pick info from Multiple Columns & rows from Unique value

    Sure. But while we're on the subject, can I ask if it's also possible for there to be any blanks in between non-blank entries in that column (which would currently be an issue for the set-up I gave you)?

    Regards

  9. #9
    Registered User
    Join Date
    07-14-2012
    Location
    Lisboa, Portugal
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: Pick info from Multiple Columns & rows from Unique value

    Nop that column will never haver blanks between non-blank entries


    Thanks

  10. #10
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Pick info from Multiple Columns & rows from Unique value

    Thanks.

    And does your results table in actuality fall directly below your data? I only ask as this makes the creation of a dynamic range which determines the last-used cell in that table a touch problematic (though not impossible).

    (A results table under an expanding source table in any case seems a little unwise, if you don't mind my saying so. )

    Regards

  11. #11
    Registered User
    Join Date
    07-14-2012
    Location
    Lisboa, Portugal
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: Pick info from Multiple Columns & rows from Unique value

    No my result table will be in another sheet

    I've setup the table already and it works expect for the topic at hand

    contactos_alternativos_Apoio.xls

    Here's the file so you can see

    Thanks

  12. #12
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Pick info from Multiple Columns & rows from Unique value

    Ok, so if you make one further addition to Name Manager:

    Name: LRow
    Refers to: =MATCH(88^88,contactos_cliente.rdl!$A:$A)

    which assumes that your values in column A of that sheet will all be numerical, then your definitions for ID_NIC and Contacts are now:

    Name: ID_NIC
    Refers to: =contactos_cliente.rdl!$A$2:INDEX(contactos_cliente.rdl!$A:$A,LRow)

    Name: Contacts
    Refers to: =contactos_cliente.rdl!$B$2:INDEX(contactos_cliente.rdl!$H:$H,LRow)

    and both will now respond dynamically to additions/removals to that source data (based on their being a numerical entry in column A, of course).

    Note that deleting row 2 within this sheet will cause these definitions to fail.

    Regards

  13. #13
    Registered User
    Join Date
    07-14-2012
    Location
    Lisboa, Portugal
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: Pick info from Multiple Columns & rows from Unique value

    Works perfectly

    My objective here is to create a template and paste the info there from another workbook so the file will always be empty


    Thanks so much for all the help

  14. #14
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Pick info from Multiple Columns & rows from Unique value

    Sure! Glad to help!

    Cheers

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. combining unique records with different column info from multiple sheets
    By BethaW in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-18-2015, 03:08 PM
  2. [SOLVED] Look for unique info in one column, show sum from multiple tabs / columns
    By galvinpaddy in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 01-28-2013, 09:36 AM
  3. [SOLVED] Look for unique info in column A, show sum from multiple columns
    By galvinpaddy in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-08-2013, 08:03 AM
  4. Replies: 1
    Last Post: 11-29-2012, 06:24 PM
  5. [SOLVED] How do I take Multiple Rows with all columns Unique with the exception of 1 to 1 Row?
    By venusofathens in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-08-2012, 04:09 PM

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