Altered column highlight on double click

motilulla

Well-known Member
Joined
Feb 13, 2008
Messages
2,422
Office Version
  1. 2010
Hello,</SPAN></SPAN>

Highlights different column on double clicking. </SPAN></SPAN>

For example double clicking (highlight multicolumn) on cell N12-highlihght 2 columns C12:D42, on cell O12-highlihght 4 columns C12:F42, on cell P12-highlihght 6 columns C12:H42 </SPAN></SPAN>

For example double clicking (highlight single column) on cell U12-highlihght 1 columns C12:C42, on cell AB12-highlihght 1 columns D12:D42, on cell AF12-highlihght 6 columns E12:E42</SPAN></SPAN>

Data looks as shown below</SPAN></SPAN>


Book1
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAF
4
5n1n2n3n4n5n6n1,2n3,4n5,6n1n2n3
64872594 | 84 | 8 | 7 | 24 | 8 | 7 | 2 | 5 | 9487
791033829 | 109 | 10 | 3 | 39 | 10 | 3 | 3 | 8 | 29103
86002006 | 06 | 0 | 0 | 26 | 0 | 0 | 2 | 0 | 0600
96631556 | 66 | 6 | 3 | 16 | 6 | 3 | 1 | 5 | 5663
105664715 | 65 | 6 | 6 | 45 | 6 | 6 | 4 | 7 | 1566
118610278 | 68 | 6 | 1 | 08 | 6 | 1 | 0 | 2 | 7861
127364177 | 37 | 3 | 6 | 47 | 3 | 6 | 4 | 1 | 7736
1320651072 | 02 | 0 | 6 | 52 | 0 | 6 | 5 | 10 | 7206
142209762 | 22 | 2 | 0 | 92 | 2 | 0 | 9 | 7 | 6220
153241603 | 23 | 2 | 4 | 13 | 2 | 4 | 1 | 6 | 0324
162146152 | 12 | 1 | 4 | 62 | 1 | 4 | 6 | 1 | 5214
170134760 | 10 | 1 | 3 | 40 | 1 | 3 | 4 | 7 | 6013
188414128 | 48 | 4 | 1 | 48 | 4 | 1 | 4 | 1 | 2841
191872461 | 81 | 8 | 7 | 21 | 8 | 7 | 2 | 4 | 6187
209751979 | 79 | 7 | 5 | 19 | 7 | 5 | 1 | 9 | 7975
217485787 | 47 | 4 | 8 | 57 | 4 | 8 | 5 | 7 | 8748
2258411025 | 85 | 8 | 4 | 15 | 8 | 4 | 1 | 10 | 2584
23102397410 | 210 | 2 | 3 | 910 | 2 | 3 | 9 | 7 | 41023
245144985 | 15 | 1 | 4 | 45 | 1 | 4 | 4 | 9 | 8514
252813112 | 82 | 8 | 1 | 32 | 8 | 1 | 3 | 1 | 1281
263744913 | 73 | 7 | 4 | 43 | 7 | 4 | 4 | 9 | 1374
278633988 | 68 | 6 | 3 | 38 | 6 | 3 | 3 | 9 | 8863
287718377 | 77 | 7 | 1 | 87 | 7 | 1 | 8 | 3 | 7771
293483473 | 43 | 4 | 8 | 33 | 4 | 8 | 3 | 4 | 7348
309914699 | 99 | 9 | 1 | 49 | 9 | 1 | 4 | 6 | 9991
314131254 | 14 | 1 | 3 | 14 | 1 | 3 | 1 | 2 | 5413
323957793 | 93 | 9 | 5 | 73 | 9 | 5 | 7 | 7 | 9395
339346029 | 39 | 3 | 4 | 69 | 3 | 4 | 6 | 0 | 2934
340755770 | 70 | 7 | 5 | 50 | 7 | 5 | 5 | 7 | 7075
359896179 | 89 | 8 | 9 | 69 | 8 | 9 | 6 | 1 | 7989
368148958 | 18 | 1 | 4 | 88 | 1 | 4 | 8 | 9 | 5814
376876906 | 86 | 8 | 7 | 66 | 8 | 7 | 6 | 9 | 0687
3858107235 | 85 | 8 | 10 | 75 | 8 | 10 | 7 | 2 | 35810
395466275 | 45 | 4 | 6 | 65 | 4 | 6 | 6 | 2 | 7546
402346422 | 32 | 3 | 4 | 62 | 3 | 4 | 6 | 4 | 2234
414111714 | 14 | 1 | 1 | 14 | 1 | 1 | 1 | 7 | 1411
429467759 | 49 | 4 | 6 | 79 | 4 | 6 | 7 | 7 | 5946
Sheet2


Thanks In Advance </SPAN></SPAN>
Using version 2000</SPAN></SPAN>

Regards,</SPAN></SPAN>
Moti</SPAN></SPAN>
 
Last edited:
Moti
Fluff raised the legitimate point of not being able to EDIT other cells in the Sheet, Personally I use the F2 Key for ALL Edit of Cells (I never double-click to enter the Edit Mode), but anyway...
To Allow this -- all I did was to ' comment out the two (2) lines:

'Cancel = True
'MsgBox "Not a Qualifying Column to Click"

Seems to work...

HTH Jim
jim, I did tried your code commenting out the two (2) lines: as you said but it is selecting column top to last data row note: I want to highlight from the same row to last data row as Fulff, code is working

Ok now I have another problem which I observe just now let say when I double click on cell N18 I want to be highlighted columns C18 & D till last row
is it possible to be highlighted column N18 as well till last row? </SPAN></SPAN>

Thank you
</SPAN></SPAN>

Kind Regards,
</SPAN></SPAN>
Moti
</SPAN></SPAN>
 
Last edited:
Upvote 0

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
use
Code:
      End Select
      Union(Intersect(Range(Cols), Rows(Target.Row & ":" & UsdRws)), Range(Target, Cells(UsdRws, Target.Column))).Select
   End If
 
Upvote 0
Solution
use
Code:
      End Select
      Union(Intersect(Range(Cols), Rows(Target.Row & ":" & UsdRws)), Range(Target, Cells(UsdRws, Target.Column))).Select
   End If
Fluff, :pray: I am very gratefully to you for modifying 3rd time and providing a complete solution of my request. Worked like a charm</SPAN></SPAN>

Thank you very much
</SPAN></SPAN>

Kind Regards,:-D
</SPAN></SPAN>
Moti
</SPAN></SPAN>
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,305
Members
452,633
Latest member
DougMo

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