Inserting Formula into Conditional Formatting Function in excel

Napzz

New Member
Joined
May 22, 2022
Messages
8
Hi everyone. I am trying to conditional format the **Paired-up Table** according to the result of the Paired column.


The "BoyA" column reflects the Row number of the Paired-up Table, the "BoyB" column reflects the column number of the Paired-up Table.

For example: If the value in the **Paired** column is 1, I would like to highlight the cell in the Paired-up Table according to the BoyA and BoyB.

Since the Paired column shows the value of 1 when BoyA=1 and BoyB=5, I have to highlight the value 2 from Row 1 and Column 5 of the Paired-up Table, and so on and so forth.

I have tried many different ways by tying the formula into the conditional formatting function of excel but in vain. Thank you!



Screenshot 2022-05-22 at 12.17.05.png
Screenshot 2022-05-22 at 12.17.15.png
Screenshot 2022-05-22 at 12.17.48.png
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
6random.xlsx
ABCDEFGHIJKLMN
512345678BoyABoyBScorePaired
6193421571290
724567831330
83428351440
9432461521
1058761610
116231750
12741870
1382340
142450
152560
162670
172780
182831
193440
203520
213680
223731
233850
244530
254621
264740
274860
285680
295770
305860
316720
326830
337840
Sheet1
Cell Formulas
RangeFormula
M6:M33M6=INDEX($B$6:$I$13,K6,L6)
Named Ranges
NameRefers ToCells
BoyA=Sheet1!$K$6:$K$33M6
BoyB=Sheet1!$L$6:$L$33M6
Cells with Conditional Formatting
CellConditionCell FormatStop If True
N6:N33Cell Value=1textNO
 
Upvote 0
Welcome to the MrExcel board!

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’)

Is this what you mean?

22 05 22.xlsm
ABCDEFGHIJKLMN
512345678BoyABoyBScorePaired
6193421571290
724567831330
83428351440
9432461521
1058761610
116231750
12741870
1382340
142450
152560
162670
172780
182831
193440
203520
213680
223731
233850
244530
254621
264740
274860
285680
295770
305860
316720
326830
337840
CF
Cell Formulas
RangeFormula
M6:M33M6=INDEX($B$6:$I$13,K6,L6)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B6:I13Expression=COUNTIFS($K$6:$K$33,$A6,$L$6:$L$33,B$5,$N$6:$N$33,1)textNO
 
Upvote 0
Solution
Welcome to the MrExcel board!

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’)

Is this what you mean?

22 05 22.xlsm
ABCDEFGHIJKLMN
512345678BoyABoyBScorePaired
6193421571290
724567831330
83428351440
9432461521
1058761610
116231750
12741870
1382340
142450
152560
162670
172780
182831
193440
203520
213680
223731
233850
244530
254621
264740
274860
285680
295770
305860
316720
326830
337840
CF
Cell Formulas
RangeFormula
M6:M33M6=INDEX($B$6:$I$13,K6,L6)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B6:I13Expression=COUNTIFS($K$6:$K$33,$A6,$L$6:$L$33,B$5,$N$6:$N$33,1)textNO
Hi Peter. Thank you so much for your response.
Your formula makes sense to me but I am not sure why it does not work on my side. (It shows an error message)
What can I do with this situation?

I am currently using MacOS with the latest version of Excel.
Thanks!
 
Upvote 0
I am currently using MacOS with the latest version of Excel.
Please put that information in your Account details as suggested so the information is always readily available to helpers.

(It shows an error message)
What error message?

In your Excel do you normally use commas or semicolons to separate function arguments?
 
Upvote 0
Please put that information in your Account details as suggested so the information is always readily available to helpers.


What error message?

In your Excel do you normally use commas or semicolons to separate function arguments?
Solved! Thank you for the suggestions and answers
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,181
Members
452,615
Latest member
bogeys2birdies

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