Returns the title according to the values in the database

Omer_K

Board Regular
Joined
Apr 9, 2017
Messages
124
Office Version
  1. 365
Hello friends
I have a database with a date column, the customer's name in the header - when that column has values and the country of that customer,
At the bottom of the sheet there is a small database with date, country and value and I am interested in returning the customer name - in the sheet I attached I am interested in finding the cell range: H16: H22
Attach you a sample sheet - hope I was clear:

Data.xlsx
ABCDEFGHIJKLM
1Dateclient 1Countryclient 2Countryclient 3Countryclient 4Countryclient 5Countryclient 6Country
206/10/202178Italy4Germany11Netherlands5Germany99Italy17Argentina
307/10/202178Italy4Germany11Netherlands5Germany99Italy17Argentina
413/10/202178Italy4Germany11Netherlands5Germany99Italy17Argentina
514/10/202178Italy4Germany11Peru3Germany99Italy17Argentina
620/10/202180Italy4Argentina11Peru3Germany99Italy17Argentina
721/10/202180Italy4Argentina12Peru3Germany99Netherlands17New Zealand
827/10/202180Italy4Argentina12Peru3Argentina99Netherlands17New Zealand
928/10/202178Germany4Argentina12Peru3Argentina54Netherlands17New Zealand
1003/11/202178Germany4Argentina12Peru3Argentina54Netherlands17New Zealand
1104/11/202178Germany4Argentina12Peru3Argentina54Netherlands17New Zealand
12
13
14
15DateCountryNo.Client
1621/10/2021Germany3client 4
1721/10/2021Netherlands99client 5
1828/10/2021New Zealand17client 6
1903/11/2021Argentina3client 4
2021/10/2021Italy80client 1
2107/10/2021Netherlands11client 3
2214/10/2021Germany4client 2
Data
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
My version is Microsoft 365 For Biz
 
Upvote 0
Thanks for that, if numbers in the client column are never repeated on a particular row, as per your sample, try
Excel Formula:
=INDEX($B$1:$M$1,MATCH(G16,FILTER($B$2:$M$11,$A$2:$A$11=E16),0))
 
Upvote 0
Thanks for that, if numbers in the client column are never repeated on a particular row, as per your sample, try
Excel Formula:
=INDEX($B$1:$M$1,MATCH(G16,FILTER($B$2:$M$11,$A$2:$A$11=E16),0))
Th
Thank you Fluff ?
The problem is the client column are repeated on a particular row :(
So should also contain the number..
 
Upvote 0
That formula is looking for the number. Are you saying that the same number might appear more than once is a row?
 
Upvote 0
Ok, in that case how about
Excel Formula:
=INDEX($B$1:$M$1,AGGREGATE(15,6,(COLUMN($B$1:$M$1)-COLUMN($B$1)+1)/($A$2:$A$12=E16)/($B$2:$L$12=G16)/($C$2:$M$12=F16),1))
 
Upvote 0
Ok, in that case how about
Excel Formula:
=INDEX($B$1:$M$1,AGGREGATE(15,6,(COLUMN($B$1:$M$1)-COLUMN($B$1)+1)/($A$2:$A$12=E16)/($B$2:$L$12=G16)/($C$2:$M$12=F16),1))
First of all - i'm so appreciate your help (and your genius ?)
I'm running the formula and I'm having another problem where it could be that the date, value and country are repeated by some customers - so I need him to show me all the customers
I showed you the example in the database below:
Data.xlsx
ABCDEFGHIJKLM
1Dateclient 1Countryclient 2Countryclient 3Countryclient 4Countryclient 5Countryclient 6Country
206/10/202178Italy4Germany11Netherlands11Netherlands99Italy17Argentina
307/10/202178Italy4Germany11Netherlands11Netherlands99Italy17Argentina
413/10/202178Italy4Germany11Netherlands5Germany99Italy17Argentina
514/10/202178Italy4Germany11Peru3Germany99Italy17Argentina
620/10/202180Italy4Argentina11Peru3Germany99Italy17Argentina
721/10/202180Italy4Argentina12Peru3Germany99Netherlands17New Zealand
827/10/202180Italy4Argentina12Peru3Argentina99Netherlands17New Zealand
928/10/202178Germany4Argentina12Peru3Argentina54Netherlands17New Zealand
1003/11/202178Germany4Argentina12Peru3Argentina54Netherlands17New Zealand
1104/11/202178Germany4Argentina12Peru3Argentina54Netherlands17New Zealand
12
13
14
15DateCountryNo.Client
1621/10/2021Netherlands11client 3
1721/10/2021Netherlands11client 4
1828/10/2021New Zealand17client 6
1903/11/2021Argentina3client 4
2021/10/2021Italy80client 1
2107/10/2021Netherlands11client 3
2214/10/2021Germany4client 2
Data
Cell Formulas
RangeFormula
H18:H22H18=INDEX($B$1:$M$1,AGGREGATE(15,6,(COLUMN($B$1:$M$1)-COLUMN($B$1)+1)/($A$2:$A$12=E18)/($B$2:$L$12=G18)/($C$2:$M$12=F18),1))
 
Upvote 0
How about
Excel Formula:
=INDEX($B$1:$M$1,AGGREGATE(15,6,(COLUMN($B$1:$M$1)-COLUMN($B$1)+1)/($A$2:$A$12=E16)/($B$2:$L$12=G16)/($C$2:$M$12=F16),COUNTIFS(E$16:E16,E16,F$16:F16,F16,G$16:G16,G16)))
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,857
Members
449,051
Latest member
excelquestion515

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