Formula Help

rehberger

Board Regular
Joined
Aug 28, 2013
Messages
52
I have spreadsheet with the data set up like the first table. It runs across for 100's of columns, these are just the first 3 categories. Is there a way to pull the amounts based on the location and acct# in a set up like the second table? All of the Acct#'s in the data are not the same in each row as shown in the 4th row. Thanks for any assistance.

LocationAcct#AmountLocationAcct#AmountLocationAcct#Amount
Reno1874291.25Land1874300.00Atrium1874225.50
Reno1875100.00Land1875200.00Atrium187525.00
Reno187650.50Land189080.00Atrium188075.50

<tbody>
</tbody>

Acct#Amount
Reno1874
1875
1876
Atrium1874
1875
1890

<tbody>
</tbody>
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
something like that?


LocationAcct#Amount
Reno
1874​
291.25​
Reno
1875​
100​
Reno
1876​
50.5​
Land
1874​
300​
Land
1875​
200​
Land
1890​
80​
Atrium
1874​
225.5​
Atrium
1875​
25​
Atrium
1880​
75.5​
 
Upvote 0
Maybe something like this


A
B
C
D
E
F
G
H
I
J
K
L
1
Location​
Acct#​
Amount​
Location​
Acct#​
Amount​
Location​
Acct#​
Amount​
2
Reno​
1874​
291,25​
Land​
1874​
300,00​
Atrium​
1874​
225,50​
3
Reno​
1875​
100,00​
Land​
1875​
200,00​
Atrium​
1875​
25,00​
4
Reno​
1876​
50,50​
Land​
1890​
80,00​
Atrium​
1880​
75,50​
5
6
7
8
9
Location​
Column​
Acct#​
Amount​
10
Reno​
1​
1874​
291,25​
11
1​
1875​
100,00​
12
1​
1876​
50,50​
13
Atrium​
9​
1874​
225,50​
14
9​
1875​
25,00​
15
9​
1880​
75,50​
16
Land​
5​
1874​
300,00​
17
5​
1875​
200,00​
18
5​
1890​
80,00​
19

Formula in B10 copied down
=IF(C10="","",MATCH(LOOKUP(2,1/(A$10:A10<>""),A$10:A10),$2:$2,0))

Formula in D10 copied down
=IF(C10="","",INDEX(INDEX(A:ZZ,0,B10+2),MATCH(C10,INDEX(A:ZZ,0,B10+1),0)))

Hope this helps

M.
 
Upvote 0
Hi,

If you don't mind copying the "Location" names in each subset down column A like my sample below.

Whether you keep or not keep the Blank row between subsets is up to you, if the blank row(s) between subsets are eliminated, we won't need to test B Column for Blanks.


Book1
ABCDEFGHIJK
1LocationAcct#AmountLocationAcct#AmountLocationAcct#Amount
2Reno1874291.25Land1874300Atrium1874225.5
3Reno1875100Land1875200Atrium187525
4Reno187650.5Land189080Atrium188075.5
5
6
7Acct#Amount
8Reno1874291.25
9Reno1875100
10Reno187650.5
11
12Atrium1874225.5
13Atrium187525
14Atrium18900
15
16
17Acct#Amount
18Reno1874291.25
19Reno1875100
20Reno187650.5
21Atrium1874225.5
22Atrium187525
23Atrium18900
Sheet153
Cell Formulas
RangeFormula
C8=IF(B8="","",SUMIFS(C$2:K$4,A$2:I$4,A8,B$2:J$4,B8))
C18=SUMIFS(C$2:K$4,A$2:I$4,A18,B$2:J$4,B18)


Either formula copied down.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,454
Messages
6,124,933
Members
449,195
Latest member
Stevenciu

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