Formula Question

ExcelGon

New Member
Joined
Mar 2, 2018
Messages
2
Hi,

I need help with a formula please! I have an excel sheet with multiple tabs. So on sheet 1 I have all master data and on sheet 2, I break out a section of the data. In the example below, we are looking at the master data and on sheet two, I need to pull all books that have at least one "yes" over and it needs to show the corresponding code. For example, I'm looking for all codes (TSS, RML, LOO, BDG, TRR, SMS, APP) that the books apply to.

Master Data - "Books" is Column A.

Books
Data
Facts
TSS
RML
LOO
BDG
TRR
SMS
APP
Transfer
PlaceHolder
PlaceHolder
Yes
No
No
No
Yes
Yes
No
Regulation
PlaceHolder
PlaceHolder
No
No
No
No
No
No
No
Control
PlaceHolder
PlaceHolder
No
Yes
Yes
Yes
Yes
No
Yes
-
-
PlaceHolder
No
Yes
Yes
Yes
No
No
No

<tbody>
</tbody>


Here is an example of what I need the formula to do on another tab of the workbook. The formula needs to be such that whenever the master information is updated, this other tab with automatically update. So below, each Book that contains a "yes" on the master sheet populates, showing which of the codes had a "yes". (CODES are columns D-J above)


BooksCodes
TransferTSS
TRR
SMS
ControlRML
LOO
BDG
TRR
APP
-RML
LOO
BDG

<tbody>
</tbody><colgroup><col><col></colgroup>


Sorry If I'm not explaining this well. I hope someone can help!

Thanks!
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Hello,

In sheet 2 cell B2 you can test following array formula

Code:
=IF(ROWS(B$2:B2)<=COUNTIF(Data!$D$2:$J$2,"Yes"),INDEX(Data!$D$1:$J$1,SMALL(IF(Data!$D$2:$J$2="Yes",COLUMN(Data!$D$2:$J$2)-COLUMN(Data!$D$2)+1),ROWS(B$2:B2))),"")

Hope this will help
 
Upvote 0
Hello,

In sheet 2 cell B2 you can test following array formula

Code:
=IF(ROWS(B$2:B2)<=COUNTIF(Data!$D$2:$J$2,"Yes"),INDEX(Data!$D$1:$J$1,SMALL(IF(Data!$D$2:$J$2="Yes",COLUMN(Data!$D$2:$J$2)-COLUMN(Data!$D$2)+1),ROWS(B$2:B2))),"")

Hope this will help


Hello,

This didn't work. Not sure what happened.
 
Upvote 0
Welcome to the forum!

With your Master Data tab defined as you show above, try this on your Books tab:

AB
1BooksCodes
2TransferTSS
3TransferTRR
4TransferSMS
5ControlRML
6ControlLOO
7ControlBDG
8ControlTRR
9ControlAPP
10-RML
11-LOO
12-BDG
13

<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Books

Array Formulas
CellFormula
A2{=IF(ROWS($A$2:$A2)>COUNTIF('Master Data'!$D$2:$J$10,"Yes"),"",INDEX('Master Data'!$A$2:$A$10,MATCH(ROWS($A$2:$A2)-1,COUNTIF(OFFSET('Master Data'!$D$1:$J$1,0,0,ROW('Master Data'!$A$2:$A$10)-ROW('Master Data'!$A$2)+1),"Yes"))))}
B2{=IF(A2="","",INDEX('Master Data'!$D$1:$J$1,SMALL(IF(OFFSET('Master Data'!$D$2:$J$2,MATCH(A2,'Master Data'!$A$2:$A$10,0)-1,0)="Yes",COLUMN('Master Data'!$D$1:$J$1)-COLUMN('Master Data'!$D$1)+1),COUNTIF($A$2:$A2,$A2))))}

<thead>
</thead><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>



Both the formulas are array formulas, make sure you use Control+Shift+Enter when entering them in the formula bar. Change the ranges as needed. Then copy the formulas and drag down as far as needed.

Note that the book name is listed on every row. If you want to only show the book name once, you can use Conditional Formatting. Select column A, click Conditional Formatting > New Rule > Use a formula > and enter:

=a1=offset(a1,-1,0)

Then click Format > Number > Custom > and in the Type: box, put ;;;

Click OK. Let us know how this works for you.
 
Upvote 0

Forum statistics

Threads
1,216,070
Messages
6,128,613
Members
449,460
Latest member
jgharbawi

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