+ Reply to Thread
Results 1 to 9 of 9

Array formula needed? Not sure how to query a dataset

Hybrid View

willm Array formula needed? Not... 02-14-2019, 08:30 AM
PaulM100 Re: Array formula needed? Not... 02-14-2019, 08:46 AM
willm Re: Array formula needed? Not... 02-14-2019, 09:22 AM
PaulM100 Re: Array formula needed? Not... 02-14-2019, 10:22 AM
Bo_Ry Re: Array formula needed? Not... 02-14-2019, 10:29 AM
willm Re: Array formula needed? Not... 02-14-2019, 11:29 AM
PaulM100 Re: Array formula needed? Not... 02-14-2019, 11:32 AM
willm Re: Array formula needed? Not... 02-14-2019, 11:39 AM
willm Re: Array formula needed? Not... 02-14-2019, 11:57 AM
  1. #1
    Registered User
    Join Date
    08-31-2011
    Location
    Sheffield, England
    MS-Off Ver
    Excel 2010
    Posts
    55

    Array formula needed? Not sure how to query a dataset

    Hi everyone,

    I have a question on building a formula.

    Please have a look at the attached sample.

    Basically, TABLE2 and TABLE3 need to query TABLE1 and return the results as popluated. I couldn't figure out whether this would be an array formula or a vlookup.
    Attached Files Attached Files

  2. #2
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: Array formula needed? Not sure how to query a dataset

    Not sure if you should already have the host name or not. if not, then use: =IFERROR(LOOKUP(2, 1/(COUNTIF($B$6:B6,$P$7:$P$9)=0), $P$7:$P$9), LOOKUP(2, 1/(COUNTIF($B$6:B6,$U$7:$U$9)=0), $U$7:$U$9))

    for the other details do a double vlookup =IFERROR(VLOOKUP(B7,$P$7:$S$9,2,0),VLOOKUP(B7,$U$7:$X$9,2,0))
    Click the * to say thanks.

  3. #3
    Registered User
    Join Date
    08-31-2011
    Location
    Sheffield, England
    MS-Off Ver
    Excel 2010
    Posts
    55

    Re: Array formula needed? Not sure how to query a dataset

    Hi,

    To be more exact, look at the new sheet.

    Table2 needs to query table 1 and for each cell, pull in the relevant name/slot/port. This is switch 1. Then table 3 needs to do the same for switch 2.

    I have manually put the values in table2 and table3 to show what needs pulling in. Each row, in table2 and table3 must pull in the data so it reads left to right and each host is on the same line, as shown in the data i inputted.
    Attached Files Attached Files
    Last edited by willm; 02-14-2019 at 09:30 AM.

  4. #4
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: Array formula needed? Not sure how to query a dataset

    Oh, I understood it backwards. Formula in Q7 if you have the host name set up: =INDEX($G$7:$G$12,MATCH($P7&$P$5,$B$7:$B$12&$F$7:$F$12,0))

    If you need to bring the hostname as well then use =INDEX($B$7:$B$12, SMALL(IF(($P$14=$F$7:$F$12), MATCH(ROW($F$7:$F$12), ROW($F$7:$F$12)), ""),ROWS($A$1:A1))), formula in P15, array entered
    Attached Files Attached Files

  5. #5
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: Array formula needed? Not sure how to query a dataset

    Please try at P7 drag across and down

    =IFERROR(INDEX($B:$H,AGGREGATE(15,6,ROW($B$7:$B$12)/($F$7:$F$12=LOOKUP("z",$P$5:P$5)),ROWS(P$7:P7)),MATCH(P$6,$B$6:$H$6,)),"")
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    08-31-2011
    Location
    Sheffield, England
    MS-Off Ver
    Excel 2010
    Posts
    55

    Re: Array formula needed? Not sure how to query a dataset

    Hi,

    Thanks for getting back to me.

    When I popluate the data with different values in Table1, the formula no longer appears to function.
    Attached Files Attached Files

  7. #7
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: Array formula needed? Not sure how to query a dataset

    Of course it won't work. you've changed the common key that was founf in F column(switch1 or swith2) that was found in P5 and T5, the merged cells. Doing so, these cannnot be linked anymore.

  8. #8
    Registered User
    Join Date
    08-31-2011
    Location
    Sheffield, England
    MS-Off Ver
    Excel 2010
    Posts
    55

    Re: Array formula needed? Not sure how to query a dataset

    :-( ok thanks

  9. #9
    Registered User
    Join Date
    08-31-2011
    Location
    Sheffield, England
    MS-Off Ver
    Excel 2010
    Posts
    55

    Re: Array formula needed? Not sure how to query a dataset

    I understand what you are syaing, thank you, your foruma works a treat

+ 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. Query Dataset and Return Value Based on Date Range
    By bigscreentv in forum Excel General
    Replies: 1
    Last Post: 11-15-2017, 01:50 AM
  2. Having trouble getting a array formula to work with larger dataset
    By Revam in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 03-13-2017, 10:13 AM
  3. [SOLVED] Stumped with Formula Array returning cell adjacent to formula dataset
    By Giles_Silver in forum Excel General
    Replies: 5
    Last Post: 06-04-2012, 12:18 AM
  4. Array formulas for a large dataset
    By Freedan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-25-2012, 12:48 PM
  5. Array formula help, counting size of a dataset!
    By ad9051 in forum Excel General
    Replies: 4
    Last Post: 12-09-2010, 10:06 AM
  6. Replies: 2
    Last Post: 07-26-2010, 03:57 AM
  7. Dataset into Excel Sheet using array
    By junho in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-20-2005, 01:37 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