Matching headers replace part of the formula

audax48

Board Regular
Joined
May 19, 2012
Messages
54
Office Version
  1. 2019
Platform
  1. Windows
I need some help, please

I have 2 worksheets with headers....ws2 is the master with 20 names as header and below (ROW 2) a formula {=SUMPRODUCT((Sheet1!$A$1:$XQ$1=A$1)*(Sheet1!$Z$2:$Z$39=Sheet1!$A$2:$A$39))} and ws1 has 9 names as header, (the names of the headers are the same), and below (ROW 2 - ROW 39) data, I want to check for MATCHING each of the 9 names of the header ws1 with the header of the ws2, IF the name Match I need to Replace $Z$2:$Z$39 in the formula for the column's letter of the ws1, where the match was found, ex...if the match was in column D of the ws1, the formula will be {=SUMPRODUCT((Sheet1!$A$1:$XQ$1=A$1)*(Sheet1!$D$2:$D$39=Sheet1!$A$2:$A$39))}.

Thank a lot
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

Forum statistics

Threads
1,223,911
Messages
6,175,322
Members
452,635
Latest member
laura12345

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