Link to home
Create AccountLog in
Avatar of pfmurray
pfmurrayFlag 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
SOLUTION
Avatar of Alan
Alan
Flag of New Zealand image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
ASKER CERTIFIED SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Avatar of 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