Avatar of pfmurray
pfmurray
Flag for United Kingdom of Great Britain and Northern Ireland asked on

Creating a range reference in Excvel VBA from text in a spreadsheet cell.

I wish to convert the following spreadsheet formula to one calculated in VBA.

=ROUND(SUMIFS(INDIRECT(B2),TM1_cats,A2,TM1_month,G2)*1000,0)

The problem I'm having is replicating the "Indirect(b2)" piece of the formula in VBA. I keep getting Error 1004. Does anyone have the right syntax for this? I've been searching a while but can't find anything that works.

Thanks
Microsoft ExcelSpreadsheetsVBA

Avatar of undefined
Last Comment
pfmurray

8/22/2022 - Mon
SOLUTION
Alan

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
Saurabh Singh Teotia

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
pfmurray

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
pfmurray

ASKER
Whilst both solutions may have worked with more effort and understanding the underlying issues weren't resolved and time was of the essence
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23