get cell address from formula result

stijnvanhoof

New Member
Joined
Dec 27, 2018
Messages
1
Hi I'm making a dashboard where I import raw data reports from an old fashioned ERP system into different sheets. The dashboard sheet then retrieves and calculates different results and combines these into 1 view on 1 sheet.To find the top performing customers YTD, the dashboard retrieves it's data in sheet 'sales per klant' using the aggregate function: =AGGREGATE(14;6;(('sales per klant'!$H$3:$H$1002)*('sales per klant'!$A$3:$A$1002=$A$6));1). the value returned is correct. However I also want to have the D cell retrieved that is the same as the result found with this formula so I can also link the customer name in the dashboard. So ideally I need a formula to determine the location of the cell that is the result of the formula, or another way to get this done.

In other words: My formula gives me a result based on the value in another sheet and returns this value. I also need the address of that value in the 'sales per klant' sheet so I can also display the customer name linked to that found cell result.

thanks a lot
 

RCBricker

Well-known Member
Joined
Feb 4, 2003
Messages
1,560
[FONT=&]Hi I'm making a dashboard where I import raw data reports from an old fashioned ERP system into different sheets. The dashboard sheet then retrieves and calculates different results and combines these into 1 view on 1 sheet.[/FONT][FONT=&]To find the top performing customers YTD, the dashboard retrieves it's data in sheet 'sales per klant' using the aggregate function: [/FONT][FONT=&]=AGGREGATE(14;6;(('sales per klant'!$H$3:$H$1002)*('sales per klant'!$A$3:$A$1002=$A$6));1).[/FONT][FONT=&] [/FONT][FONT=&]the value returned is correct. However I also want to have the D cell retrieved that is the same as the result found with this formula so I can also link the customer name in the dashboard. So ideally I need a formula to determine the location of the cell that is the result of the formula, or another way to get this done.

In other words: My formula gives me a result based on the value in another sheet and returns this value. I also need the address of that value in the 'sales per klant' sheet so I can also display the customer name linked to that found cell result.

thanks a lot
[/FONT]
This works with dummy data.

Code:
=INDIRECT("Sheet4!"&ADDRESS(MATCH(MAX(Sheet4!B1:B4),Sheet4!B1:B4,0),1))
1. Note that "Sheet4!" is the sheet name used in the dummy data. Change to reflect your sheet name where the data is kept.
2. Note that the match function uses the MAX range twice, both for Match and the after the next comma.
3. Note the ,1)) reflects my use of column A to house the name of the sales person. Change to reflect the column number of your sales person's name.
 

Marcelo Branco

MrExcel MVP
Joined
Aug 23, 2010
Messages
16,317
Assuming
-the formula above is in cell A2 (adjust to suit);
-the names are in D3:D1002.

Maybe something like this to get the name that corresponds to Max value (A2) in column H
=INDEX('sales per klant'!D3:D1002;AGGREGATE(14;6;(ROW('sales per klant'!D3:D1002)-ROW('sales per klant'!D3)+1)/(('sales per klant'!H3:H1002=A2)*('sales per klant'!A3:A1002=A6));1))

Hope this helps

M.
 

Forum statistics

Threads
1,082,316
Messages
5,364,483
Members
400,802
Latest member
RichBRich

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top