+ Reply to Thread
Results 1 to 3 of 3

Xlookup variable to search for defined by slicer

  1. #1
    Forum Contributor
    Join Date
    07-19-2019
    Location
    Illinois, USA
    MS-Off Ver
    365
    Posts
    164

    Xlookup variable to search for defined by slicer

    I have a data table set up with a bing maps connected to display various locations around the USA. To the right of the map is a slicer allowing you to select a company name... based on that, the map isolates the address of the selection. So far, everything works fine.

    But what I want to be able to do is display other values from the data table, based on the slicer selection.

    I noticed in the slicer options, it gives you a name to "use in formulas" so I set my xlookup to:

    Please Login or Register  to view this content.
    But the lookup formula returns #N/A

    I've read around Google a bit - and everyone keeps saying "Use a pivot table!" -- but if I format my data into a pivot table, I don't know how to use that pivot to create the map... it seems as though the map has to come from the data table, and the slicer has to link to a pivot table... but then the two aren't sync'd up and the slicer won't be used by the formula to return the additional data. (Dang, I hope that made sense...)

    I've tried attaching a workbook, but every time I hit "upload file" the forum tells me that "the upload failed". It does not give me a reason "Why"... it is a basic xlsx workbook?




    EDIT TO ADD:

    I was able to upload other workbooks just fine -- my assumption is that it wont' allow me to upload it because it has a "Bing Map" in the workbook? That's the only variable that seems different to me? But if I remove the bing map, i'm not really providing an example...any ideas?
    Last edited by PrimePorkchop; 10-24-2021 at 11:49 PM.

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Xlookup variable to search for defined by slicer

    OK, try this function. Mind you, it will only return the first selected value of a slicer. If multiple values are selected in the slicer, subsequent values will be ignored.

    Please Login or Register  to view this content.
    For example, I have a slicer called "Sales Person" however I have to use "Slicer_Sales_Person" as the string to feed to the function. What you see as the slicer name in slicer settings isn't exactly what you need to use in VBA. Prefix it with "Slicer_" and put underscores in places of spaces.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Xlookup variable to search for defined by slicer

    Here is an expanded version of the above. It returns a comma separated list of slicer selections If you only have one value selected, the results will be the same as above

    Please Login or Register  to view this content.

+ 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. [SOLVED] Combing SUMIF SEARCH and XLookup
    By Dustychops in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-23-2021, 02:24 PM
  2. Xlookup search for value in multiple cols
    By Jbk5u in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-01-2021, 02:10 AM
  3. Chained xlookup and reverse partial lookup/search?
    By paventiger in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-16-2021, 01:04 AM
  4. [SOLVED] search data using xlookup function in excel?
    By rena80 in forum Excel General
    Replies: 0
    Last Post: 09-15-2021, 11:57 PM
  5. [SOLVED] Using IF, Xlookup and Match/search, to find value in array.
    By Lee_of_Excel in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-16-2020, 12:09 AM
  6. Replies: 1
    Last Post: 04-23-2018, 09:43 AM
  7. Macro to Insert defined integer into range defined by variable criteria
    By stereofeedback in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-06-2013, 12:33 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