Using Index, Match and Small to Populate Data from a Data Page

NateN

New Member
Joined
Apr 4, 2017
Messages
18
Good Day,

I'm trying to figure out how to pull data from my raw data page (Screenshot 1) and transfer certain data to the second spreadsheet (Screenshot 2). I'm having troubles with getting my formula to populate the correct run number.

I'm trying to use Index match function. If I select company 1 then it should populate all of company 1's transactions. But when company one has more than 1 transaction on the same day, the formula doesn't seem to pick up the next #.

I've been playing around with the formula but I can't seem to get it to work.

Any help would be greatly appreciated.


Excel 2010
A
B
C
D
E
F
1
Transferor
Transferee
Date
Transfer
Deemed Assets
Deemed Liabilities
2
1
2
28-Apr-17
1234567
$0.00
($72,526.00)
3
2
1
28-Apr-17
1234568
$0.00
$72,526.00
4
3
6
25-Apr-17
1234569
$0.00
$0.00
5
4
15
25-Apr-17
1234570
$0.00
$0.00
6
4
5
25-May-17
1234571
($500.00)
($1,000.00)
7
5
4
5-Apr-17
1234572
$0.00
$0.00
8
1
2
29-Apr-17
1234573
$500.00
($500.00)
9
1
8
29-Apr-17
1234574
$500.00
($500.00)

<tbody>
</tbody>
Sheet1





Excel 2010
A
B
3
1
4
Date
Run #
10
28-Apr-17
1234567
11
29-Apr-17
1234573
12
29-Apr-17
1234573

<tbody>
</tbody>
Sheet3


Array Formulas
Cell
Formula
A10
{=IFERROR(INDEX(Sheet1!$C$2:$C$8, SMALL(IF((Sheet1!$A$2:$A$37=$A$3)*(Sheet1!$G$2:$G$37=Sheet3!$D$3),ROW(Sheet1!$C$2:$C$37)-MIN(ROW(Sheet1!$C$2:$C$37))+1),ROWS(A$10:A10)),1),"")}
B10
{=IFERROR(INDEX(Sheet1!$A$2:$F$9,SMALL(IF((Sheet1!$A$2:$A$8=Sheet3!$A$3)*(Sheet1!$C$2:$C$8=Sheet3!A10),ROW(Sheet1!$D$2:$D$8)-MIN(ROW(Sheet1!$D$2:$D$8))+1),ROWS(2:2)),4),"")}
A11
{=IFERROR(INDEX(Sheet1!$C$2:$C$9, SMALL(IF((Sheet1!$A$2:$A$37=$A$3)*(Sheet1!$G$2:$G$37=Sheet3!$D$3),ROW(Sheet1!$C$2:$C$37)-MIN(ROW(Sheet1!$C$2:$C$37))+1),ROWS(A$10:A11)),1),"")}
B11
{=IFERROR(INDEX(Sheet1!$A$2:$F$9,SMALL(IF((Sheet1!$A$2:$A$8=Sheet3!$A$3)*(Sheet1!$C$2:$C$8=Sheet3!A11),ROW(Sheet1!$D$2:$D$8)-MIN(ROW(Sheet1!$D$2:$D$8))+1),ROWS(3:3)),4),"")}
A12
{=IFERROR(INDEX(Sheet1!$C$2:$C$9, SMALL(IF((Sheet1!$A$2:$A$37=$A$3)*(Sheet1!$G$2:$G$37=Sheet3!$D$3),ROW(Sheet1!$C$2:$C$37)-MIN(ROW(Sheet1!$C$2:$C$37))+1),ROWS(A$10:A12)),1),"")}
B12
{=IFERROR(INDEX(Sheet1!$A$2:$F$9,SMALL(IF((Sheet1!$A$2:$A$8=Sheet3!$A$3)*(Sheet1!$C$2:$C$8=Sheet3!A12),ROW(Sheet1!$D$2:$D$8)-MIN(ROW(Sheet1!$D$2:$D$8))+1),ROWS(4:4)),4),"")}

<tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>
 
For cell A4, should there also be a criteria for the company? Or is this all overridden since now we have a carryover column that says "Yes".

The latter. This formula will only pull results with a "Yes" in column G so there is no need to specify date range or company number.
 
Upvote 0

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
It works perfectly. For the deemed assets and liability, it was producing a number that wouldn't belong to the company number. So adding in that criteria should fix the problem?
 
Upvote 0
It works perfectly. For the deemed assets and liability, it was producing a number that wouldn't belong to the company number. So adding in that criteria should fix the problem?

I'm not sure what you mean. The formula that only looks for "Yes" in Sheet1 column G does just that.

If there is a "Yes" in column G then the values in that row will be brought over to Sheet3.

The assets and liabilities columns will then be multiplied by 1 or -1 depending on which column the company number is in. This is the only part that looks for the company number.
 
Upvote 0
I'm not sure what you mean. The formula that only looks for "Yes" in Sheet1 column G does just that.

If there is a "Yes" in column G then the values in that row will be brought over to Sheet3.

The assets and liabilities columns will then be multiplied by 1 or -1 depending on which column the company number is in. This is the only part that looks for the company number.

It all makes sense. I was just referencing the wrong cell. It works now! Thanks again for all your help! I don't think I could have gotten this far without your help. So thank you! :)
 
Upvote 0
It all makes sense. I was just referencing the wrong cell. It works now! Thanks again for all your help! I don't think I could have gotten this far without your help. So thank you! :)

You're very welcome. Glad to help.
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,272
Members
449,075
Latest member
staticfluids

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