Find multiple items

foseco

New Member
Joined
Feb 26, 2016
Messages
5
Hi

I have a budget spreadsheet and I am trying to produce a reports page. I have a named range of auditall which contains a date, an item name and a value. There are also named ranges, auditdate which contains just the dates, audititem which contains just the items and auditvalue which contains just the values. I want to report all the items that follow a bank charge with the date, item name and value.

I have used
Excel Formula:
=INDEX(audititem,MATCH("Bank Charges",audititem,0)+1)
which works for the first item only. I considered using match to find the row that item exists on and then starting a new search on the next row from that row number but I can't get match to match the entire criteria, only the item name and that returns the wrong row number as it returns another item with the same name that doesn't follow a bank charge.

I found the following on a site, adjusted for my sheet,
Excel Formula:
=IF(ROWS(Audit!B2)<=COUNTIF(audititem,"Bank Charges"),INDEX(audititem,AGGREGATE(15,3,((audititem="Bank Charges")/(audititem="Bank Charges")*ROW(audititem))-ROW(Audit!B2), ROWS(Audit!B2))),"")
but can only get it to return one item and if I copy it down, it doesn't return anything else.

I also tried
Excel Formula:
=TEXTJOIN(",",TRUE,IF(audititem="Bank Charges",OFFSET(audititem,1,0),""))
which does work but returns everything in one long string and only returns the items, not the other details and doesn't exclude duplicates where Bank Charges is followed by Bank Charges.

I've attached two images. The first is an example of the data. The second is the exported data I require. I just need it if the date is in the current year.

Thanks in advance for any advice.

Alex
 

Attachments

  • Untitled.png
    Untitled.png
    47.4 KB · Views: 11
  • Untitled.png
    Untitled.png
    3.8 KB · Views: 12

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Forum statistics

Threads
1,214,846
Messages
6,121,905
Members
449,054
Latest member
luca142

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