Formula to populate balance in correct column

AlbertH

New Member
Joined
Jan 1, 2019
Messages
1
Hi,

I need assistance to create a formula that will populate the state columns (F - H) with the Balance in Column D by checking:

1. The subacct in the workpaper tab against the data in the Subacct tab.
2. The Subacct tab will have the State associated with the subacct.

For the 50000 in Column D, I want it to populate 50000 in Column F (CA) b/c subacct 200-1000 is in CA.

I've tried SUMIFS but cannot get it to work.

Workpaper Tab:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[/TR]
[TR]
[TD]Acct[/TD]
[TD]Subacct[/TD]
[TD]Description[/TD]
[TD]Balance[/TD]
[TD][/TD]
[TD]CA[/TD]
[TD]ND[/TD]
[TD]TX[/TD]
[/TR]
[TR]
[TD]300000[/TD]
[TD]200-1000[/TD]
[TD]Rental[/TD]
[TD]50000[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]300000[/TD]
[TD]200-1001[/TD]
[TD]Rental[/TD]
[TD]30000[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]300000[/TD]
[TD]200-1002[/TD]
[TD]Rental[/TD]
[TD]10000[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]400000[/TD]
[TD]200-1000[/TD]
[TD]Interest[/TD]
[TD]80[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]400000[/TD]
[TD]200-1001[/TD]
[TD]Interest[/TD]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]400000[/TD]
[TD]200-1002[/TD]
[TD]Interest[/TD]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


Subaccount Tab:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]Subacct[/TD]
[TD]Investment[/TD]
[TD]State[/TD]
[/TR]
[TR]
[TD]200-1000[/TD]
[TD]Building A[/TD]
[TD]CA[/TD]
[/TR]
[TR]
[TD]200-1001[/TD]
[TD]Building B[/TD]
[TD]TX[/TD]
[/TR]
[TR]
[TD]200-1002[/TD]
[TD]Building C[/TD]
[TD]ND[/TD]
[/TR]
</tbody>[/TABLE]

Thanks!
A
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
you could use an IF with a lookup and then SUM
probably an easier way - but this comes to mind

IF( index('Subaccount Tab'!$C:$C , match($b2,'Subaccount Tab'!$A:$A,0)) =F$1 , sumif($B$2:$B$20, $B2, $D$2:$D$20) , "" )
copy across and down, but it will show against all entries

you could add another IF to only count the first entry

=IF( COUNTIF($B$2:$B2, $B2) =1, IF( INDEX('Subaccount tab'!$C:$C, MATCH($B2,'Subaccount tab'!$A:$A,0)) =F$1, SUMIF($B$2:$B$20, $B2, $D$2:$D$20), "" ),"")

just setup
=IF( COUNTIF($B$2:$B2, $B2) =1, IF( INDEX('Subaccount tab'!$C:$C, MATCH($B2,'Subaccount tab'!$A:$A,0)) =F$1, SUMIF($B$2:$B$20, $B2, $D$2:$D$20), "" ),"")

https://www.dropbox.com/s/8wcjp5emdg7s06w/Statelookup_etaf.xlsx?dl=0

But you are NOT summing them all
it may be simple if all you want to do is move the value under the correct column and not sum them all

i'll post again as the edit will time out
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,184
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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