Running Formula from a concatenated string.

vlerden

New Member
Joined
Jun 22, 2017
Messages
17
This is the string that produces a working formula.

=CONCATENATE("=SUMIF(Table_Data[Date],TODAY()-",$B15,",Table_Data[",C$26,"])")

C26 - is the header of the table
B15 - is the number of days current or before

[TABLE="width: 734"]
<tbody>[TR]
[TD]The result is a formula that I can paste into notepad, then re-copy into excel for the correct result.

=SUMIF(Table_Data[Date],TODAY()-0,Table_Data[Column1])


The problem is that I need to run the product of the concatenation in about 1000 cells... I've tried using INDIRECT as my tool but I keep getting #REF! as a result instead of the result from the SUMIF... Below is my INDIRECT

=INDIRECT(CONCATENATE("=SUMIF(Table_Data[Date],TODAY()-",$B15,",Table_Data[",C$26,"])"))[/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]
 
Hi

Try :-
Code:
=SUMIF(Table_Data[Date],TODAY()-$A1,INDEX(Table_Data,,MATCH(A$20,Table_Data[#Headers],0)))

hth
 
Last edited:
Upvote 0

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
This worked wonderfully. I obviously have a long way to go. This will really help me learn the INDEX command better. For some reason I never thought about doing that. You really rock dude!!!
 
Upvote 0
Thanks for the feedback.

Could you try this :-
Code:
=SUMIF(Table_Data[Date],TODAY()-$A1,Table_Data["Stuff_" & COLUMNS($B$1:B$1)])
in cell B1 then copy across and down.

TIA
 
Last edited:
Upvote 0
I like the idea, but the "Stuff_" breaks the formula. I'm consulting master Google, but haven't come up with anything yet
 
Upvote 0

Forum statistics

Threads
1,223,248
Messages
6,171,011
Members
452,374
Latest member
keccles

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top