formula - Xlookup/Vlookup

GeorgeTimes

New Member
Joined
Jul 22, 2022
Messages
16
Office Version
  1. 365
  2. 2021
  3. 2019
  4. 2016
  5. 2013
  6. 2011
  7. 2010
  8. 2007
Platform
  1. Windows
Hi all,

I'm trying to write a formula in order to look for 2 items in a Pivot Table.
My table has 2 column:
1- Country (i.e UK, Spain, France etc.)
2- Company name

For every new week I have a new Pivot Table and what I'm trying to do is search if Company X (CocaCola for example) within Country Y (UK for example) from this week data was in that first week Pivot Table.

My issue: If first week I have for example Coca Cola in UK, and now in the second week I have Coca Cola in Spain, what I want to do is search if Coca Cola in Spain appeared in the first week.

At the moment I don't know how to search for both "Coca Cola" and "Spain" within a PivotTable. I've tried Xlookup however I get the return as affirmative as I only check for the word "Coca Cola"

Any idea what kind of formula I need in order to be able to search for both words?


example.xlsx
BC
20Row LabelsSum of Total 90+ EUR
21UK8876.3264
22Company B-343.7656
23Coca Cola9220.092
24Ireland
25Company C
26Spain
27Company D
28France255450.15
29Company E255450.15
30Grand Total264326.4764
Table
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Is the source data from the same table? If so, is the date in that source data? If so, use a Pivot FIlter.
IF So, like this (My pivot layout is different, but I hope you understand, it is the filter at the top):
Some Mr Excel Questions.xlsx
BCDEFGHIJ
1
2DATE1/1/2023
3PRODUCTPEPSI COLA
4DATECOUNTRYPRODUCTSALES
51/1/2023UKCOCA COLA166COUNTRYSum of SALES
612/1/2022SPAINPEPSI COLA200UK64
71/1/2023FRANCESPRITE93Grand Total64
812/1/2022UKPEPSI COLA122
91/1/2023SPAINSPRITE99
1012/1/2022FRANCECOCA COLA93
111/1/2023UKPEPSI COLA64
1212/1/2022SPAINPEPSI COLA98
131/1/2023FRANCESPRITE141
1412/1/2022UKPEPSI COLA126
15
Sheet5
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,182
Members
452,615
Latest member
bogeys2birdies

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top