Highlight other cells when I select another

edge37

Board Regular
Joined
Sep 1, 2016
Messages
102
Office Version
  1. 365
Platform
  1. Windows
Hello there!

Spreadsheet example:

[TABLE="width: 858"]
<colgroup><col><col span="11"></colgroup><tbody>[TR]
[TD]Mario Speedwagon.[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]6[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]7[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]25[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD]Petey Cruiser.[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]6[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]38[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]8[/TD]
[/TR]
</tbody>[/TABLE]

I've been wondering if it's possible to do this: When I click on a name, the other cells in the same row that I could be able to specify (with the number values in the example) highlight as well (highlighting preferences would be able to be edited to my likes).

Thanks in advance
 

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"
Hi ,

If you want merely by clicking the row should be highlighted , then VBA will be required.

If you are willing to use the F9 key to force a recalculate , then a formula based solution is possible.

In any unused worksheet cell , say G2 , enter the formula :

=CELL("address")

Now , let us assume that your CF range would be $E$6:$Q$22 ; select this range , and enter the following CF formula :

=IF(AND($G$2 = "$A$" & ROW(A6), ROW(INDIRECT($G$2)) = ROW()), 1, 0)

Apply any fill colour of your choice.

Now when ever you place the cursor in any cell in the range A6:A22 , and press the F9 key , the corresponding cells in the range E6:Q22 will be highlighted.
 
Upvote 0
Thanks for you fast reply. I have 3 questions: 1) Where should I put the second formula? (I got lost when you said "select this range , and enter the following CF formula :"), 2) Do I have to select the range before entering the formula? (dont know how), and, 3) Where do you specify the range to be highlighted in that formula?

Thanks again and sorry for my poor Excel knowledge
 
Last edited:
Upvote 0
Hi ,

In the data that you have posted :
[TABLE="class: cms_table, width: 858"]
<tbody>[TR]
[TD]Mario Speedwagon.[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]6[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]7[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]25[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD]Petey Cruiser.[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]6[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]38[/TD]
[/TR]
</tbody>[/TABLE]
I assume that the names are in column A , starting from row 6. I assume that the numbers are in the range E6:L6 and downwards , let us say till row 22.

You would therefore select the range E6:L22 first.

Now , click on Conditional Formatting , New Rule , Use a formula to determine which cells to format ; the screen will now display a box labelled :

Format values where this formula is true

Enter the formula in this box , and click OK.
 
Upvote 0
Solution

Forum statistics

Threads
1,224,828
Messages
6,181,201
Members
453,022
Latest member
RobertV1609

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