Looking to sum Actual, Budget, Variance YTD data in last three columns in the correct column based on the number in current period, tried sumifs, sum/index, and sumproduct didn’t work.
[TABLE="width: 0, align: left"]
<tbody>[TR]
[TD][/TD]
[TD]Current Year
[/TD]
[TD]2019
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Current Period
[/TD]
[TD]2
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Actual
[/TD]
[TD]Budget
[/TD]
[TD]Variance
[/TD]
[TD]Actual
[/TD]
[TD]Budget
[/TD]
[TD]Variance
[/TD]
[TD]Actual
[/TD]
[TD]Budget
[/TD]
[TD]Variance
[/TD]
[TD]Actual
[/TD]
[TD]Budget
[/TD]
[TD]Variance
[/TD]
[/TR]
[TR]
[TD]Natural
[/TD]
[TD][/TD]
[TD]1
[/TD]
[TD]1
[/TD]
[TD]1
[/TD]
[TD]2
[/TD]
[TD]2
[/TD]
[TD]2
[/TD]
[TD]3
[/TD]
[TD]3
[/TD]
[TD]3
[/TD]
[TD]YTD
[/TD]
[TD]YTD
[/TD]
[TD]YTD
[/TD]
[/TR]
[TR]
[TD]50000
[/TD]
[TD][/TD]
[TD] 105,494
[/TD]
[TD] 105,933
[/TD]
[TD] (439)
[/TD]
[TD] -
[/TD]
[TD] 105,933
[/TD]
[TD] (105,933)
[/TD]
[TD] -
[/TD]
[TD] 105,933
[/TD]
[TD] (105,933)
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[/TR]
[TR]
[TD]50000
[/TD]
[TD][/TD]
[TD] 30,518
[/TD]
[TD] 30,002
[/TD]
[TD] 516
[/TD]
[TD] 100,000
[/TD]
[TD] 30,002
[/TD]
[TD] 69,998
[/TD]
[TD] 800,000
[/TD]
[TD] 30,002
[/TD]
[TD] (30,002)
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[/TR]
[TR]
[TD]50000
[/TD]
[TD][/TD]
[TD] 83,713
[/TD]
[TD] 83,627
[/TD]
[TD] 86
[/TD]
[TD] 50,000
[/TD]
[TD] 83,627
[/TD]
[TD] (83,627)
[/TD]
[TD] -
[/TD]
[TD] 94,877
[/TD]
[TD] (94,877)
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[/TR]
[TR]
[TD]50000
[/TD]
[TD][/TD]
[TD] 69,269
[/TD]
[TD] 63,969
[/TD]
[TD] 5,300
[/TD]
[TD] -
[/TD]
[TD] 63,969
[/TD]
[TD] (63,969)
[/TD]
[TD] -
[/TD]
[TD] 80,635
[/TD]
[TD] (80,635)
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[/TR]
[TR]
[TD]50000
[/TD]
[TD][/TD]
[TD] 100,504
[/TD]
[TD] 98,454
[/TD]
[TD] 2,050
[/TD]
[TD] -
[/TD]
[TD] 98,454
[/TD]
[TD] (98,454)
[/TD]
[TD] -
[/TD]
[TD] 98,454
[/TD]
[TD] (98,454)
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[/TR]
[TR]
[TD]50000
[/TD]
[TD][/TD]
[TD] 36,621
[/TD]
[TD] 30,167
[/TD]
[TD] 6,455
[/TD]
[TD] -
[/TD]
[TD] 30,167
[/TD]
[TD] (30,167)
[/TD]
[TD] -
[/TD]
[TD] 42,667
[/TD]
[TD] (42,667)
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[/TR]
[TR]
[TD]50000
[/TD]
[TD][/TD]
[TD] 31,158
[/TD]
[TD] 27,032
[/TD]
[TD] 4,126
[/TD]
[TD] -
[/TD]
[TD] 27,032
[/TD]
[TD] (27,032)
[/TD]
[TD] -
[/TD]
[TD] 35,365
[/TD]
[TD] (35,365)
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[/TR]
[TR]
[TD]50000
[/TD]
[TD][/TD]
[TD] 215,391
[/TD]
[TD] 211,401
[/TD]
[TD] 3,990
[/TD]
[TD] -
[/TD]
[TD] 211,401
[/TD]
[TD] (211,401)
[/TD]
[TD] -
[/TD]
[TD] 211,401
[/TD]
[TD] (211,401)
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[/TR]
[TR]
[TD]50000
[/TD]
[TD][/TD]
[TD] 152,361
[/TD]
[TD] 157,216
[/TD]
[TD] (4,855)
[/TD]
[TD] -
[/TD]
[TD] 157,216
[/TD]
[TD] (157,216)
[/TD]
[TD] -
[/TD]
[TD] 157,216
[/TD]
[TD] (157,216)
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[/TR]
[TR]
[TD]50000
[/TD]
[TD][/TD]
[TD] 47,501
[/TD]
[TD] 46,151
[/TD]
[TD] 1,350
[/TD]
[TD] -
[/TD]
[TD] 46,151
[/TD]
[TD] (46,151)
[/TD]
[TD] -
[/TD]
[TD] 46,151
[/TD]
[TD] (46,151)
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[/TR]
[TR]
[TD]50000
[/TD]
[TD][/TD]
[TD] 73,030
[/TD]
[TD] 72,519
[/TD]
[TD] 511
[/TD]
[TD] -
[/TD]
[TD] 72,519
[/TD]
[TD] (72,519)
[/TD]
[TD] -
[/TD]
[TD] 72,519
[/TD]
[TD] (72,519)
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[/TR]
[TR]
[TD]50000
[/TD]
[TD][/TD]
[TD] 79,732
[/TD]
[TD] 84,002
[/TD]
[TD] (4,270)
[/TD]
[TD] -
[/TD]
[TD] 87,169
[/TD]
[TD] (87,169)
[/TD]
[TD] -
[/TD]
[TD] 91,336
[/TD]
[TD] (91,336)
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[/TR]
[TR]
[TD]50000
[/TD]
[TD][/TD]
[TD] 66,294
[/TD]
[TD] 65,831
[/TD]
[TD] 463
[/TD]
[TD] -
[/TD]
[TD] 65,831
[/TD]
[TD] (65,831)
[/TD]
[TD] -
[/TD]
[TD] 65,831
[/TD]
[TD] (65,831)
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD] 1,091,587
[/TD]
[TD] 1,076,304
[/TD]
[TD] 15,283
[/TD]
[TD] 150,000
[/TD]
[TD] 1,079,471
[/TD]
[TD] (979,471)
[/TD]
[TD] 800,000
[/TD]
[TD] 1,132,387
[/TD]
[TD] (1,132,387)
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 0, align: left"]
<tbody>[TR]
[TD][/TD]
[TD]Current Year
[/TD]
[TD]2019
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Current Period
[/TD]
[TD]2
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Actual
[/TD]
[TD]Budget
[/TD]
[TD]Variance
[/TD]
[TD]Actual
[/TD]
[TD]Budget
[/TD]
[TD]Variance
[/TD]
[TD]Actual
[/TD]
[TD]Budget
[/TD]
[TD]Variance
[/TD]
[TD]Actual
[/TD]
[TD]Budget
[/TD]
[TD]Variance
[/TD]
[/TR]
[TR]
[TD]Natural
[/TD]
[TD][/TD]
[TD]1
[/TD]
[TD]1
[/TD]
[TD]1
[/TD]
[TD]2
[/TD]
[TD]2
[/TD]
[TD]2
[/TD]
[TD]3
[/TD]
[TD]3
[/TD]
[TD]3
[/TD]
[TD]YTD
[/TD]
[TD]YTD
[/TD]
[TD]YTD
[/TD]
[/TR]
[TR]
[TD]50000
[/TD]
[TD][/TD]
[TD] 105,494
[/TD]
[TD] 105,933
[/TD]
[TD] (439)
[/TD]
[TD] -
[/TD]
[TD] 105,933
[/TD]
[TD] (105,933)
[/TD]
[TD] -
[/TD]
[TD] 105,933
[/TD]
[TD] (105,933)
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[/TR]
[TR]
[TD]50000
[/TD]
[TD][/TD]
[TD] 30,518
[/TD]
[TD] 30,002
[/TD]
[TD] 516
[/TD]
[TD] 100,000
[/TD]
[TD] 30,002
[/TD]
[TD] 69,998
[/TD]
[TD] 800,000
[/TD]
[TD] 30,002
[/TD]
[TD] (30,002)
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[/TR]
[TR]
[TD]50000
[/TD]
[TD][/TD]
[TD] 83,713
[/TD]
[TD] 83,627
[/TD]
[TD] 86
[/TD]
[TD] 50,000
[/TD]
[TD] 83,627
[/TD]
[TD] (83,627)
[/TD]
[TD] -
[/TD]
[TD] 94,877
[/TD]
[TD] (94,877)
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[/TR]
[TR]
[TD]50000
[/TD]
[TD][/TD]
[TD] 69,269
[/TD]
[TD] 63,969
[/TD]
[TD] 5,300
[/TD]
[TD] -
[/TD]
[TD] 63,969
[/TD]
[TD] (63,969)
[/TD]
[TD] -
[/TD]
[TD] 80,635
[/TD]
[TD] (80,635)
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[/TR]
[TR]
[TD]50000
[/TD]
[TD][/TD]
[TD] 100,504
[/TD]
[TD] 98,454
[/TD]
[TD] 2,050
[/TD]
[TD] -
[/TD]
[TD] 98,454
[/TD]
[TD] (98,454)
[/TD]
[TD] -
[/TD]
[TD] 98,454
[/TD]
[TD] (98,454)
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[/TR]
[TR]
[TD]50000
[/TD]
[TD][/TD]
[TD] 36,621
[/TD]
[TD] 30,167
[/TD]
[TD] 6,455
[/TD]
[TD] -
[/TD]
[TD] 30,167
[/TD]
[TD] (30,167)
[/TD]
[TD] -
[/TD]
[TD] 42,667
[/TD]
[TD] (42,667)
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[/TR]
[TR]
[TD]50000
[/TD]
[TD][/TD]
[TD] 31,158
[/TD]
[TD] 27,032
[/TD]
[TD] 4,126
[/TD]
[TD] -
[/TD]
[TD] 27,032
[/TD]
[TD] (27,032)
[/TD]
[TD] -
[/TD]
[TD] 35,365
[/TD]
[TD] (35,365)
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[/TR]
[TR]
[TD]50000
[/TD]
[TD][/TD]
[TD] 215,391
[/TD]
[TD] 211,401
[/TD]
[TD] 3,990
[/TD]
[TD] -
[/TD]
[TD] 211,401
[/TD]
[TD] (211,401)
[/TD]
[TD] -
[/TD]
[TD] 211,401
[/TD]
[TD] (211,401)
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[/TR]
[TR]
[TD]50000
[/TD]
[TD][/TD]
[TD] 152,361
[/TD]
[TD] 157,216
[/TD]
[TD] (4,855)
[/TD]
[TD] -
[/TD]
[TD] 157,216
[/TD]
[TD] (157,216)
[/TD]
[TD] -
[/TD]
[TD] 157,216
[/TD]
[TD] (157,216)
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[/TR]
[TR]
[TD]50000
[/TD]
[TD][/TD]
[TD] 47,501
[/TD]
[TD] 46,151
[/TD]
[TD] 1,350
[/TD]
[TD] -
[/TD]
[TD] 46,151
[/TD]
[TD] (46,151)
[/TD]
[TD] -
[/TD]
[TD] 46,151
[/TD]
[TD] (46,151)
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[/TR]
[TR]
[TD]50000
[/TD]
[TD][/TD]
[TD] 73,030
[/TD]
[TD] 72,519
[/TD]
[TD] 511
[/TD]
[TD] -
[/TD]
[TD] 72,519
[/TD]
[TD] (72,519)
[/TD]
[TD] -
[/TD]
[TD] 72,519
[/TD]
[TD] (72,519)
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[/TR]
[TR]
[TD]50000
[/TD]
[TD][/TD]
[TD] 79,732
[/TD]
[TD] 84,002
[/TD]
[TD] (4,270)
[/TD]
[TD] -
[/TD]
[TD] 87,169
[/TD]
[TD] (87,169)
[/TD]
[TD] -
[/TD]
[TD] 91,336
[/TD]
[TD] (91,336)
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[/TR]
[TR]
[TD]50000
[/TD]
[TD][/TD]
[TD] 66,294
[/TD]
[TD] 65,831
[/TD]
[TD] 463
[/TD]
[TD] -
[/TD]
[TD] 65,831
[/TD]
[TD] (65,831)
[/TD]
[TD] -
[/TD]
[TD] 65,831
[/TD]
[TD] (65,831)
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD] 1,091,587
[/TD]
[TD] 1,076,304
[/TD]
[TD] 15,283
[/TD]
[TD] 150,000
[/TD]
[TD] 1,079,471
[/TD]
[TD] (979,471)
[/TD]
[TD] 800,000
[/TD]
[TD] 1,132,387
[/TD]
[TD] (1,132,387)
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[TD] -
[/TD]
[/TR]
</tbody>[/TABLE]