I want this formula to be dynamic. let it index the column name for table LastQ from a cell: column name LOB takes the column name from b12. Tier from b13. sub b14. configuration from b15. color b16. =LET(
jarir, D2,
extra, D3,
branded, D4,
unbranded, D5,
primaryLOB, C12,
primaryTier, 13,
primarySSub, 14,
primaryConfig, 15,
primaryColor, 16,
sumCriteria, LAMBDA(hq,prog,
IF(AND( NOT(6), NOT(7) ),
To make your formula dynamic by referencing column names from specified cells (B12, B13, B14, B15, B16 for LOB, Tier, Sub, Configuration, and Color respectively), you'll need to modify the existing formula to use the INDEX and MATCH functions or FILTER function to dynamically address the correct columns. Here's a modified version of your formula which implements that dynamic referencing:
Dynamic Column Reference: Replace static column references such as lastQ[[LOB]:[LOB]] with lastQ[INDEX(lastQ, 0, MATCH(primaryLOB, lastQ[#Headers], 0))]. This way, you're matching against the header names that you have in cells B12, B13, etc.
Error Handling: Ensure that you also have error handling for cases where the column headers don't match, using IFERROR.
Complete Rest of Formula: You'll need to replicate the dynamic referencing for all instances of LOB, Tier, Sub, and others throughout the formula where it’s currently referenced by fixed column names.
Compatibility: Depending on the version of Excel, using structured references with dynamic indexing might behave differently. It’s advisable to test it thoroughly to ensure it works as expected.
Make sure to adapt these changes throughout your logic, maintaining the structure and calculations as per your requirements.
Please double-check the adjustments made in your own Excel environment to ensure it behaves as expected with your data.
I need it to perform this formula while index and match the column name from B12 to b16. =LET(
jarir, D2,
extra, D3,
branded, D4,
unbranded, D5,
primaryLOB, C12,
primaryTier, C13,
primarySSub, C14,
primaryConfig, C15,
primaryColor, C16,
sumCriteria, LAMBDA(hq,prog,
IF(AND( NOT(D6), NOT(D7) ),
Certainly! Below is the full formula with the dynamic column references based on the values in cells B12 to B16 for LOB, Tier, Sub, Configuration, and Color, using INDEX and MATCH to find the appropriate columns in the lastQ table:
This version of the formula dynamically looks up the column names for LOB, Tier, Sub, Configuration, and Color based on the values in cells B12 to B16. Be sure to validate and test the formula in your Excel environment to ensure it functions as expected.