# Help with Sum(index(match))

#### Wmickle

##### New Member
I'm working with spreadsheet that has current year and prior year data in rows and months as columns. There is also column for QTD. I'm trying to use sum, index, match that would sum current ytd & pytd #s based on cell \$V\$1 'input current month'. Here's the formula I'm trying to use. SUM(A3:INDEX(C3:Q3,MATCH(\$V\$1,\$C\$1:\$Q\$1,0)))

This formula is summing each month + the QTD #s. How can I change formula so it doesn't include QTD column #s? Here's snipit of my table. The correct YTD \$s should be=\$8,833,333.32 and not \$15,458,333.31.

#### AlanSidman

##### Active Member
Pictures
Will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one and nobody wants to have to recreate your data from scratch.

1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

2. Make sure that your desired results are also shown (mock up the results manually).

3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

4. Try to avoid using merged cells as they cause lots of problems.

Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.

#### Wmickle

##### New Member
Thanks for the tips Alan. Here is sample data file of results returned by current formula compared to the results I want.

#### Attachments

• 29.5 KB Views: 6

#### p45cal

##### Well-Known Member
Test this in R3 (I haven't):
Code:
``=SUMIF(\$A\$1:INDEX(\$B\$1:\$Q\$1,MATCH(\$T\$1,\$B\$1:\$Q\$1,0)),"<>*Qtr*",A3:INDEX(B3:Q3,MATCH(\$T\$1,\$B\$1:\$Q\$1,0)))``
and copy down.

#### Wmickle

##### New Member
Yes, it worked! I never thought to use "<>*QTR*" in the statement. Thank you.