Jedi Master
Board Regular
- Joined
- Jun 10, 2024
- Messages
- 70
- Office Version
- 365
- Platform
- Windows
I have 10 identical worksheets that look like the below:
The following formula in cell A78 works perfectly to add all values together:
=IF($D78="","",LET(X,VSTACK('Change Order Worksheet'!$A$78:$D$113,'Change Order Worksheet (2)'!$A$78:$D$113,'Change Order Worksheet (3)'!$A$78:$D$113,'Change Order Worksheet (4)'!$A$78:$D$113,'Change Order Worksheet (5)'!$A$78:$D$113,'Change Order Worksheet (6)'!$A$78:$D$113,'Change Order Worksheet (7)'!$A$78:$D$113,'Change Order Worksheet (8)'!$A$78:$D$113,'Change Order Worksheet (9)'!$A$78:$D$113,'Change Order Worksheet (10)'!$A$78:$D$113),SUM(FILTER(CHOOSECOLS(X,1), CHOOSECOLS(X,4)=$D78))))
Named ranges: p_1 through p_10 refer to cell P13 in each of the 10 worksheets with a "Yes/No" value. I need to add the IF statement to only sum values IF P13 on each sheet is marked "Yes". I am trying the following formula and receiving an #N/A error:
=IF($D78="","",LET(x,VSTACK(IF(p_1="Yes",'Change Order Worksheet'!$A$78:$D$113,""),IF(p_2="Yes",Change Order Worksheet (2)'!$A$78:$D$113,""),IF(p_3="Yes",Change Order Worksheet (3)'!$A$78:$D$113,""),IF(p_4="Yes",Change Order Worksheet (4)'!$A$78:$D$113,""),IF(p_5="Yes",Change Order Worksheet (5)'!$A$78:$D$113,""),IF(p_6="Yes",Change Order Worksheet (6)'!$A$78:$D$113,""),IF(p_7="Yes",Change Order Worksheet (7)'!$A$78:$D$113,""),IF(p_8="Yes",Change Order Worksheet (8)'!$A$78:$D$113,""),IF(p_9="Yes",Change Order Worksheet (9)'!$A$78:$D$113,""),IF(p_10="Yes",Change Order Worksheet (10)'!$A$78:$D$113,"")),SUM(FILTER(CHOOSECOLS(X,1), CHOOSECOLS(X,4)=$D78))))
My formula is definately flawed. Can anyone help me add the IF statement to the working formula above please?
The following formula in cell A78 works perfectly to add all values together:
=IF($D78="","",LET(X,VSTACK('Change Order Worksheet'!$A$78:$D$113,'Change Order Worksheet (2)'!$A$78:$D$113,'Change Order Worksheet (3)'!$A$78:$D$113,'Change Order Worksheet (4)'!$A$78:$D$113,'Change Order Worksheet (5)'!$A$78:$D$113,'Change Order Worksheet (6)'!$A$78:$D$113,'Change Order Worksheet (7)'!$A$78:$D$113,'Change Order Worksheet (8)'!$A$78:$D$113,'Change Order Worksheet (9)'!$A$78:$D$113,'Change Order Worksheet (10)'!$A$78:$D$113),SUM(FILTER(CHOOSECOLS(X,1), CHOOSECOLS(X,4)=$D78))))
Named ranges: p_1 through p_10 refer to cell P13 in each of the 10 worksheets with a "Yes/No" value. I need to add the IF statement to only sum values IF P13 on each sheet is marked "Yes". I am trying the following formula and receiving an #N/A error:
=IF($D78="","",LET(x,VSTACK(IF(p_1="Yes",'Change Order Worksheet'!$A$78:$D$113,""),IF(p_2="Yes",Change Order Worksheet (2)'!$A$78:$D$113,""),IF(p_3="Yes",Change Order Worksheet (3)'!$A$78:$D$113,""),IF(p_4="Yes",Change Order Worksheet (4)'!$A$78:$D$113,""),IF(p_5="Yes",Change Order Worksheet (5)'!$A$78:$D$113,""),IF(p_6="Yes",Change Order Worksheet (6)'!$A$78:$D$113,""),IF(p_7="Yes",Change Order Worksheet (7)'!$A$78:$D$113,""),IF(p_8="Yes",Change Order Worksheet (8)'!$A$78:$D$113,""),IF(p_9="Yes",Change Order Worksheet (9)'!$A$78:$D$113,""),IF(p_10="Yes",Change Order Worksheet (10)'!$A$78:$D$113,"")),SUM(FILTER(CHOOSECOLS(X,1), CHOOSECOLS(X,4)=$D78))))
My formula is definately flawed. Can anyone help me add the IF statement to the working formula above please?