Check if a column has a reference on each tab but using 2 criteria

GrumpyChi

New Member
Joined
Nov 22, 2021
Messages
24
Office Version
  1. 365
Platform
  1. Windows
Hi


I have a worksheet with several tabs. Each tab is named after the Nominal code. On each individual tab there will be data like the below.

Tab named "520000"
Ref Profit centre Nominal Code
1 07 520000
1 08 520000
2 07 520000

Tab named "520001"
Ref Profit centre Nominal Code
1 07 520001
1 08 520001
2 07 520001

There is then a centralised tab which uses this formula to check whether each line has been referenced with a number. The formula is =IFERROR(IF(MATCH(A673,INDIRECT(R673&"!A:A"),0)>0,"ok","check"),"check")

In this case, A673 is the reference eg. 1

I want to add something to this formula to check whether that particular profit centre has a reference. At the moment, the formula would return "OK" for the tab 520000 for the line with a reference of 1. But in this case, I want it to be profit centre specific. Eg. if the second line from the above example was left blank, the current formula would still return OK. Hope this makes sense. Thank you.
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
can you give an example of what your goal results would be from a given data set?
examples of both ok and check please
 
Upvote 0
Hi, yes sure
So the reference tab would have an extract of data like the below

Ref OK? Profit Centre Nominal Account Text
1 ok PC01 560101 1 - Journal posting
7 ok PC02 560202 7 - accrual posting
5 check PC02 560000 5 - Journal posting

The Ref column is just extracting the number from the text column.

The OK? is the part I am struggling with. The workbook basically has this reference tab, along with a number of tabs which are named after each nominal code. So tabs are named "560101", "560202" etc.
The OK? formula is currently checking whether there is a corresponding reference on the subsequent tab. So Ref 1 above is checking the tab named "560101" to see if there is a reference of 1 (which happens to be in column A also). It does work.
The issue is, each tab may have different profit centres on it, so the formula only checks to see whether there is a 1 in the relevant tabs column, regardless of whether the profit centre is PC01 or PC02 etc.
I want it to check specifically whether the subsequent tabs have the relevant reference for that particular profit centre.

An example would be:
Reference tab:
Ref OK? Profit Centre Nominal Account Text
1 ok PC01 560101 1 - Journal posting

Tab named '560101':
Ref Profit Centre Nominal Account Text
1 PC02 560101 1 - Journal posting

The reference tab is still returning 'ok' even though the Profit centre on the tab named 560101 is PC02

Hope this makes sense.

Thank you
 
Upvote 0
i think this might help with what i believe you're looking for:

Check if a column has a reference on each tab but using 2 criteria.xlsx
ABCD
1RefOk?Profit CentreNominal Account
21ok7520000
32ok7520000
43check7520000
54check7520000
61check8520000
72ok8520000
83check8520000
94check8520000
10check7520000
11check8520000
121ok7520001
132ok7520001
143check7520001
154check7520001
161ok8520001
172check8520001
183check8520001
194check8520001
20check7520001
21check8520001
central
Cell Formulas
RangeFormula
B2:B21B2=IFERROR(IF(A2="","check",IF(MATCH(1,(C2=INDIRECT(D2&"!b:b"))*(A2=INDIRECT(D2&"!a:a")),0)>0,"ok","check")),"check")

-----------------------
Check if a column has a reference on each tab but using 2 criteria.xlsx
ABC
1RefProfit centreNominal Code
217520000
327520000
428520000
58
520000

-----------------------
Check if a column has a reference on each tab but using 2 criteria.xlsx
ABC
1RefProfit centreNominal Code
217520001
318520001
427520001
520001
 
Upvote 1
Solution
You are an absolute genius. This is exactly what I was after, it works a charm!

Thank you so much, it is hugely appreciated.
 
Upvote 0

Forum statistics

Threads
1,215,073
Messages
6,122,975
Members
449,095
Latest member
Mr Hughes

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