Return All instances that match criteria

shadbolt

Board Regular
Joined
Sep 20, 2007
Messages
90
Office Version
  1. 2016
Hi

On sheet1 I have a table.
Column a will be: Income, outgoings, savings, investments, pots
Column b will be any description
Column c - n will be months of the the year
The data is then completed for when bills and money comes in to form a budget

On Sheet2 cell c2 contains the month
I want a new table
Column b to show all incomes
Column c to look up b in bring in values
Only if month matches that where data was entered on sheet 1

i.e In sheet 1 I could put an outgoing cost of £50 for valentines and enter that only for feb
sheet 2 would only bring in that cost if we changed the month to feb

I don't want to use a pivot table or filters.

Thanks in advance
 
Right now I can't think of a way to not show the 0. I'll look at it later to see if I can think of something.
 
Upvote 0

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Right now I can't think of a way to not show the 0. I'll look at it later to see if I can think of something.
It could be a performance drain, but wraping it in an IFS(and( the calculation = 0, xxx ="Dividend"),"", the calculation)
 
Upvote 0
Try this:
Sheet 1
Book2
ABCDEFGHIJKLMN
1LIST ALL OF YOUR EXPENSES HERE
2In / OutDescriptionJan-23Feb-23Mar-23Apr-23May-23Jun-23Jul-23Aug-23Sep-23Oct-23Nov-23Dec-23
3InWages200020002000200022002200220022002200220022002200
4Inwages 215001500700700700700700700700700700700
5Outrent850850850850850850850850850850850850
6Outnetfkix101010101010101010101010
7Savingspremium bonds505050505050505050505050
8Outgym353535353535353535353535
9Outfood200200200200200200200200200200200200
10Outa150150150150150150150150150150150150
11Outb100100100100100100100100100100100100
12Outchild minder350350350350350350350350350350350350
13InCouncil Tax270270270270270270270270270270
14SavingsHoliday757575757575757575757575
15SavingsEmergencies505050505050505050505050
16SavingsChristmas 2023505050505050505050505050
17SavingsClothing303030303030303030303030
Sheet1


Sheet2
Book2
ABCD
1
2Choose the MonthFeb-23
3
4Total Estimated Income3500
5
6Estimated Income
7DescriptionAmount
8Wages2000
9wages 21500
10  
11  
12  
Sheet2
Cell Formulas
RangeFormula
C4C4=SUM(C8:C27)
B8:B12B8=IFERROR(INDEX(Sheet1!$B$3:$B$17,AGGREGATE(15,6,(ROW(Sheet1!$A$3:$A$17)-ROW(Sheet1!$A$3)+1)/((Sheet1!$A$3:$A$17="In")*(INDEX(Sheet1!$C$3:$N$17,0,MATCH(Sheet2!$C$2,Sheet1!$C$2:$N$2,0))>0)),ROWS($L$7:L7))),"")
C8:C11C8=IF($B8="","",INDEX(Sheet1!$C$3:$N$17,MATCH(Sheet2!L7,Sheet1!$B$3:$B$17,0),MATCH(Sheet2!$C$2,Sheet1!$C$2:$N$2,0)))
C12C12=IF(B12="","",INDEX(Sheet1!$C$3:$N$17,MATCH(Sheet2!B12,Sheet1!$B$3:$B$17,0),MATCH(Sheet2!$C$2,Sheet1!$C$2:$N$2,0)))
 
Upvote 0
Try this:
Sheet 1
Book2
ABCDEFGHIJKLMN
1LIST ALL OF YOUR EXPENSES HERE
2In / OutDescriptionJan-23Feb-23Mar-23Apr-23May-23Jun-23Jul-23Aug-23Sep-23Oct-23Nov-23Dec-23
3InWages200020002000200022002200220022002200220022002200
4Inwages 215001500700700700700700700700700700700
5Outrent850850850850850850850850850850850850
6Outnetfkix101010101010101010101010
7Savingspremium bonds505050505050505050505050
8Outgym353535353535353535353535
9Outfood200200200200200200200200200200200200
10Outa150150150150150150150150150150150150
11Outb100100100100100100100100100100100100
12Outchild minder350350350350350350350350350350350350
13InCouncil Tax270270270270270270270270270270
14SavingsHoliday757575757575757575757575
15SavingsEmergencies505050505050505050505050
16SavingsChristmas 2023505050505050505050505050
17SavingsClothing303030303030303030303030
Sheet1


Sheet2
Book2
ABCD
1
2Choose the MonthFeb-23
3
4Total Estimated Income3500
5
6Estimated Income
7DescriptionAmount
8Wages2000
9wages 21500
10  
11  
12  
Sheet2
Cell Formulas
RangeFormula
C4C4=SUM(C8:C27)
B8:B12B8=IFERROR(INDEX(Sheet1!$B$3:$B$17,AGGREGATE(15,6,(ROW(Sheet1!$A$3:$A$17)-ROW(Sheet1!$A$3)+1)/((Sheet1!$A$3:$A$17="In")*(INDEX(Sheet1!$C$3:$N$17,0,MATCH(Sheet2!$C$2,Sheet1!$C$2:$N$2,0))>0)),ROWS($L$7:L7))),"")
C8:C11C8=IF($B8="","",INDEX(Sheet1!$C$3:$N$17,MATCH(Sheet2!L7,Sheet1!$B$3:$B$17,0),MATCH(Sheet2!$C$2,Sheet1!$C$2:$N$2,0)))
C12C12=IF(B12="","",INDEX(Sheet1!$C$3:$N$17,MATCH(Sheet2!B12,Sheet1!$B$3:$B$17,0),MATCH(Sheet2!$C$2,Sheet1!$C$2:$N$2,0)))
c4 seems to work. for c8 i get #n/a ?
 
Upvote 0
Are you talking about Shee2?
The total in C4 is right, but you have an #N/A in for Wages in C8? Is C9 right?
 
Upvote 0
sheet2 the type of expense comes through in column b but column c is not bringing in the values
 
Upvote 0
Looks like I might have copied over some bad cell references.
Try this formula in C8 and drag down.

=IF($B8="","",INDEX(Sheet1!$C$3:$N$17,MATCH($B8,Sheet1!$B$3:$B$17,0),MATCH($C$2,Sheet1!$C$2:$N$2,0)))
 
Upvote 0
I noticed a change that needs to be made to the formula in B8.

Sheet1
Book2
ABCDEFGHIJKLMN
1LIST ALL OF YOUR EXPENSES HERE
2In / OutDescriptionJan-23Feb-23Mar-23Apr-23May-23Jun-23Jul-23Aug-23Sep-23Oct-23Nov-23Dec-23
3InWages200020002000200022002200220022002200220022002200
4Inwages 215001500700700700700700700700700700700
5Outrent850850850850850850850850850850850850
6Outnetfkix101010101010101010101010
7Savingspremium bonds505050505050505050505050
8Outgym353535353535353535353535
9Outfood200200200200200200200200200200200200
10Outa150150150150150150150150150150150150
11Outb100100100100100100100100100100100100
12Outchild minder350350350350350350350350350350350350
13InCouncil Tax270270270270270270270270270270
14SavingsHoliday757575757575757575757575
15SavingsEmergencies505050505050505050505050
16SavingsChristmas 2023505050505050505050505050
17SavingsClothing303030303030303030303030
Sheet1


Sheet2
Book2
ABC
1
2Choose the MonthFeb-23
3
4Total Estimated Income3500
5
6Estimated Income
7DescriptionAmount
8Wages2000
9wages 21500
Sheet2
Cell Formulas
RangeFormula
C4C4=SUM(C8:C27)
B8:B9B8=IFERROR(INDEX(Sheet1!$B$3:$B$17,AGGREGATE(15,6,(ROW(Sheet1!$A$3:$A$17)-ROW(Sheet1!$A$3)+1)/((Sheet1!$A$3:$A$17="In")*(INDEX(Sheet1!$C$3:$N$17,0,MATCH($C$2,Sheet1!$C$2:$N$2,0))>0)),ROWS($B$8:B8))),"")
C8:C9C8=IF($B8="","",INDEX(Sheet1!$C$3:$N$17,MATCH($B8,Sheet1!$B$3:$B$17,0),MATCH($C$2,Sheet1!$C$2:$N$2,0)))
 
Upvote 1

Forum statistics

Threads
1,214,980
Messages
6,122,563
Members
449,088
Latest member
Motoracer88

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