Combining Indirect with Match

Hello,

I'm trying to combine match with indirect so that it sums up the entire column once it matches a text value in a particular but I've been having trouble getting it to work.

Help would be greatly appreciated.

Thanks.

=SUM((INDIRECT(MATCH(B250,5:5,0)&":"&MATCH(B250,5:5,0),TRUE)))

Open in new window

LVL 1
mattfmillerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

NorieAnalyst Assistant Commented:
What exactly do you want to sum?

Your 2 MATCH formulas are going to return the column number where the value in B250 is found in row 5.

For example if the value in B250 was found in column 5 you would be summing row 5.
mattfmillerAuthor Commented:
I'm trying to sum the entire column.
NorieAnalyst Assistant Commented:
The entire column where you find the value from B250 in row 5?

You could try something like this.

=SUM(INDEX(A:Z,,MATCH(B250,5:5,0)))
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
You may also try something like this...

=SUM(INDIRECT(SUBSTITUTE(ADDRESS(1,MATCH(B250,5:5,0),4),"1","")&":"&SUBSTITUTE(ADDRESS(1,MATCH(B250,5:5,0),4),"1","")))

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Rob HensonFinance AnalystCommented:
You can create the SUM range with an OFFSET function:

=SUM(OFFSET($A$5,0,MATCH($B$250,$5:$5,0)-1,1048571,1))

Syntax of OFFSET is:

=OFFSET(Reference Point, Row Offset, Column Offset, Height, Width)

Reference Point - a known starting point, in this case you know your headings are in row 5 so the starting point can be A5
Row Offset - the headers are in row 5 so set to zero so no row offset
Column Offset - this is the unknown factor so is determined by matching B250 in row 5; the offset will then offset by that number from column A so needs reducing by 1 to get correct column.
Height - the number of rows to include in the sum, I have set to the absolute maximum (max rows of 1048576 less 5 as you are starting on row 5)
Width - just summing one column so set to 1.
mattfmillerAuthor Commented:
Perfect thank you very much.
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
You're welcome!
Thanks for the feedback.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.