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
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Hi,

Without a Pivot Table and without Filters ... you are left with Formulas and Array Formulas ...
Besides the fact, one would need to better visualize your sheet, the solution will very much depend on the Excel version you are running ...
 
Upvote 0
If this is new, may I suggest that since your are already recording a description as a column, to also put the date in a column. It by creating a flat file instead of pivoted data (you are planning to pivot by month) you make reporting and charts much more efficient and easier to build formulas with.

But, as @James006 says, more information is helpful
 
Upvote 0
I am using 2016

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
This will be in data table
EXPENSES.xlsx
ABCDEFGHIJKLMN
1LIST ALL OF YOUR EXPENSES HERE
2In / OutDescriptionJan-23Feb-23Mar-23Apr-23May-23Jun-23Jul-23Aug-23Sep-23Oct-23Nov-23Dec-23
3In Wages200020002000200022002200220022002200220022002200
4In wages 215001500700700700700700700700700700700
5Outrent850850850850850850850850850850850850
6Outnetfkix101010101010101010101010
7Savingspremium bonds505050505050505050505050
8Outgym353535353535353535353535
9Outfood200200200200200200200200200200200200
10Outa150150150150150150150150150150150150
11Outb100100100100100100100100100100100100
12Outchild minder350350350350350350350350350350350350
13In Council Tax270270270270270270270270270270
14SavingsHoliday757575757575757575757575
15SavingsEmergencies505050505050505050505050
16SavingsChristmas 2023505050505050505050505050
17SavingsClothing303030303030303030303030
In - Out
Cells with Data Validation
CellAllowCriteria
A3:A17List=DATA!$D$2:$D$5


and then I have this on another tab
EXPENSES.xlsx
BC
2Choose the MonthJan - 2023
3
4Total Estimated Income0
5
6Estimated Income
7DescriptionAmount
8#NUM!
9#NUM!
10#NUM!
11#NUM!
12#NUM!
13#NUM!
14#NUM!
15#NUM!
16#NUM!
17#NUM!
18#NUM!
19#NUM!
20#NUM!
21
22 
23 
24 
25 
26
27
Monthly Budget
Cell Formulas
RangeFormula
C4C4=SUM(C8:C27)
B8B8=INDEX('In - Out'!$B$3:$B$20, SMALL(IF("in"='In - Out'!$A$3:$A$20, ROW('In - Out'!$A$3:$A$20)-ROW($A$1)+1), ROW('In - Out'!2:2)))
B9:B20B9=INDEX('In - Out'!$B$3:$B$20, SMALL(IF("in"='In - Out'!$A$3:$A$20, ROW('In - Out'!$A$3:$A$20)-ROW($A$1)+1), ROW(2:2)))
B22B22=IFERROR(INDEX(#REF!B:B,SMALL(IF(ISNUMBER(SEARCH("*",#REF!B:B)),ROW(#REF!B:B)),ROW(15:15))),"")
B23:B25B23=IFERROR(INDEX(#REF!B18:B35,SMALL(IF(ISNUMBER(SEARCH("*",#REF!B18:B35)),ROW(#REF!B18:B35)),ROW(16:16))),"")
Press CTRL+SHIFT+ENTER to enter array formulas.
Cells with Data Validation
CellAllowCriteria
C2:D2List=DATA!$A$2:$A$13
 
Upvote 0
Maybe something like this:

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 MonthJan-23
3
4Total Estimated Income3770
5
6Estimated Income
7DescriptionAmount
8Wages2000
9wages 21500
10Council Tax270
11  
Sheet2
Cell Formulas
RangeFormula
C4C4=SUM(C8:C27)
B8:B11B8=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"),ROWS($B$8:B8))),"")
C8:C11C8=IF($B8="","",INDEX(Sheet1!$C$3:$N$17,MATCH(Sheet2!B8,Sheet1!$B$3:$B$17,0),MATCH(Sheet2!$C$2,Sheet1!$C$2:$N$2,0)))
 
Upvote 0
Maybe something like this:

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 MonthJan-23
3
4Total Estimated Income3770
5
6Estimated Income
7DescriptionAmount
8Wages2000
9wages 21500
10Council Tax270
11  
Sheet2
Cell Formulas
RangeFormula
C4C4=SUM(C8:C27)
B8:B11B8=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"),ROWS($B$8:B8))),"")
C8:C11C8=IF($B8="","",INDEX(Sheet1!$C$3:$N$17,MATCH(Sheet2!B8,Sheet1!$B$3:$B$17,0),MATCH(Sheet2!$C$2,Sheet1!$C$2:$N$2,0)))
That looks like its working for you but I don't have any results? am I doing something wrong?
 
Upvote 0
Are you getting an error, just blank cells or what?
One thing I noticed when I copied your data was a space after the word In. I removed the space thinking it was an error. Check your data and if there is a space remove it are change the formula to include the space "In ".
Also, I assumed all your dates were actual dates and not text. If some are text and some dates you will get an error.
 
Upvote 0
I've removed the space and now it's working.

Only small issue is for Feb it displays council tax at 0 cost but I don't want to display any 0.

So if dividends are an in but only 1 month a year the rest of the year it won't be displayed?
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,868
Members
449,053
Latest member
Mesh

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