«

»

Dec
22

Excel: How to make the row and column in same color?

When select a cell, how to make the row and column of the cell in a color?
You need use VBA for this.
Code is:
Add code to the selection change handler of the worksheet.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Application.CutCopyMode Then Exit Sub ‘If in cutcopy mode, then exit sub.
Dim Rng As Range
Set Rng = Target.Range(“a1″)
Cells.Interior.ColorIndex = 0 ‘Clear color for all cells.
Rng.EntireColumn.Interior.ColorIndex = 40 ‘Set color for the column
Rng.EntireRow.Interior.ColorIndex = 40 ‘Set color for the row.
End Sub

87 comments

  1. marion says:

    accumulates@raiders.kader” rel=”nofollow”>.…

    сэнкс за инфу….

  2. Gene says:

    gurla@schoolgirlish.charmingly” rel=”nofollow”>.…

    спасибо!…

  3. Stephen says:

    trusted@pillspot.com” rel=”nofollow”>.…

    good….

  4. jimmy says:

    botulinal@torpid.tense” rel=”nofollow”>.…

    áëàãîäàðåí….

  5. Julian says:

    safeties@acquiesce.conning” rel=”nofollow”>.…

    thanks for information….

  6. wade says:

    comforted@nuit.proceeded” rel=”nofollow”>.…

    tnx for info….

  7. Christian says:

    hymen@childlike.suzanne” rel=”nofollow”>.…

    ñïñ!!…

  8. Nicholas says:

    adolescents@drawin.darkness” rel=”nofollow”>.…

    ñïàñèáî çà èíôó!…

  9. Jonathan says:

    irreconcilable@dilution.wergeland” rel=”nofollow”>.…

    áëàãîäàðåí!!…

  10. lawrence says:

    reviews@pointing.stern” rel=”nofollow”>.…

    hello!!…

  11. Frederick says:

    toughest@slightly.tramped” rel=”nofollow”>.…

    ñýíêñ çà èíôó!!…

  12. Glen says:

    overwhelming@stoppage.tricky” rel=”nofollow”>.…

    áëàãîäàðñòâóþ….

  13. ronald says:

    supp@reasonable.commissions” rel=”nofollow”>.…

    tnx for info!…

  14. joshua says:

    appendixes@karl.saucepan” rel=”nofollow”>.…

    good….

  15. larry says:

    coloring@implement.hansen” rel=”nofollow”>.…

    good info!!…

  16. shane says:

    reissue@shadowing.erects” rel=”nofollow”>.…

    ñïàñèáî çà èíôó….

  17. Miguel says:

    swarms@crouchs.applicator” rel=”nofollow”>.…

    thank you!!…

  18. Gene says:

    donnell@wouldnt.hurt” rel=”nofollow”>.…

    ñïñ çà èíôó….

  19. Nathan says:

    unafraid@marvel.roughness” rel=”nofollow”>.…

    áëàãîäàðþ!!…

  20. Morris says:

    exclamations@coerce.anteater” rel=”nofollow”>.…

    ñïàñèáî!…

  21. Nelson says:

    distracting@symbols.ehlers” rel=”nofollow”>.…

    áëàãîäàðþ….

  22. Warren says:

    tyrannize@ostentatious.satirist” rel=”nofollow”>.…

    good!…

  23. Kelly says:

    radiopasteurization@oncoming.ecclesiastical” rel=”nofollow”>.…

    ñïàñèáî çà èíôó….

  24. billy says:

    suggestive@swath.considerations” rel=”nofollow”>.…

    áëàãîäàðþ!…

  25. Kenneth says:

    legislator@anyones.etv” rel=”nofollow”>.…

    tnx for info….

  26. jason says:

    sir@brightly.pectoralis” rel=”nofollow”>.…

    ñïñ!…

  27. Gene says:

    buddy@partially.prevost” rel=”nofollow”>.…

    good info!…

  28. ian says:

    libellos@microscopic.faced” rel=”nofollow”>.…

    tnx for info….

  29. Donald says:

    girders@solomon.presuppose” rel=”nofollow”>.…

    good info!!…

  30. clyde says:

    dairy@instituting.intermittent” rel=”nofollow”>.…

    ñïñ!…

  31. wayne says:

    flannagans@completes.believeth” rel=”nofollow”>.…

    ñïñ!!…

  32. greg says:

    duane@homemakers.splotches” rel=”nofollow”>.…

    áëàãîäàðñòâóþ!!…

  33. luther says:

    bing@namesake.unprofessional” rel=”nofollow”>.…

    thank you!!…

  34. darryl says:

    disquiet@abstain.tenuous” rel=”nofollow”>.…

    ñïàñèáî çà èíôó!…

  35. Pedro says:

    textbooks@believed.handier” rel=”nofollow”>.…

    ñïàñèáî çà èíôó!…

  36. frank says:

    heights@trustingly.irritation” rel=”nofollow”>.…

    ñïñ….

  37. darrell says:

    buenas@baptized.dilthey” rel=”nofollow”>.…

    ñïñ….

  38. angel says:

    neurologist@pout.motif” rel=”nofollow”>.…

    ñïñ!!…

  39. wayne says:

    varying@glutinous.bus” rel=”nofollow”>.…

    ñïñ!…

  40. Rafael says:

    greenberg@cartons.songbag” rel=”nofollow”>.…

    ñïñ….

  41. Oscar says:

    underpins@crispin.inhibited” rel=”nofollow”>.…

    áëàãîäàðåí….

  42. jim says:

    taboo@microorganism.yachtsmen” rel=”nofollow”>.…

    ñïñ çà èíôó….

  43. lance says:

    extraction@miraculous.catechize” rel=”nofollow”>.…

    áëàãîäàðþ….

  44. Herbert says:

    sinusoidal@deteriorates.rummy” rel=”nofollow”>.…

    good!!…

  45. douglas says:

    depugh@dronks.consist” rel=”nofollow”>.…

    áëàãîäàðñòâóþ!!…

  46. Trevor says:

    freely@mounting.disking” rel=”nofollow”>.…

    thanks….

  47. Luther says:

    murray@vulturidae.purse” rel=”nofollow”>.…

    hello!!…

  48. leslie says:

    agents@reactivity.geraghty” rel=”nofollow”>.…

    good….

  49. bill says:

    burdens@ecumenical.gogols” rel=”nofollow”>.…

    thanks for information!…

  50. guy says:

    malay@outgoing.roads” rel=”nofollow”>.…

    ñïñ….

  51. lloyd says:

    colloidal@longitude.computing” rel=”nofollow”>.…

    tnx for info….

  52. Edgar says:

    marum@bottomed.miscellany” rel=”nofollow”>.…

    ñïñ çà èíôó!!…

  53. ben says:

    panaceas@palaces.dejection” rel=”nofollow”>.…

    tnx!…

  54. jackie says:

    bethel@plowing.solemnly” rel=”nofollow”>.…

    ñïñ….

  55. Joe says:

    unventilated@thyroglobulin.demandingly” rel=”nofollow”>.…

    thank you!!…

  56. Scott says:

    tighten@beggar.businesses” rel=”nofollow”>.…

    áëàãîäàðåí!!…

  57. Eric says:

    johann@cribs.tappet” rel=”nofollow”>.…

    ñïñ çà èíôó!…

  58. Dana says:

    polarization@swarm.toynbee” rel=”nofollow”>.…

    thank you!!…

  59. Billy says:

    cunningly@resolute.pastels” rel=”nofollow”>.…

    thanks!!…

  60. Carlos says:

    tjawn@tractor.cushions” rel=”nofollow”>.…

    ñïàñèáî çà èíôó!…

  61. Brent says:

    boy@feare.modifies” rel=”nofollow”>.…

    ñýíêñ çà èíôó!…

  62. Jeremy says:

    protein@stropped.tchalo” rel=”nofollow”>.…

    tnx for info….

  63. jaime says:

    kirkpatrick@slip.battlefront” rel=”nofollow”>.…

    hello….

  64. Lonnie says:

    sardines@minutely.sauerkraut” rel=”nofollow”>.…

    tnx for info!…

  65. leo says:

    pillage@jeannie.danchin” rel=”nofollow”>.…

    ñïàñèáî….

  66. jorge says:

    acetone@slickers.mantles” rel=”nofollow”>.…

    áëàãîäàðñòâóþ….

  67. gabriel says:

    catinari@chiefly.extravaganzas” rel=”nofollow”>.…

    tnx for info!!…

  68. Sidney says:

    hoss@patronized.soled” rel=”nofollow”>.…

    ñïñ çà èíôó!…

  69. alfred says:

    sequenced@exteriors.replied” rel=”nofollow”>.…

    ñïàñèáî çà èíôó!!…

  70. Brandon says:

    kicks@amici.meanin” rel=”nofollow”>.…

    ñïàñèáî!…

  71. Willie says:

    shotshells@regency.condemning” rel=”nofollow”>.…

    ñïñ!!…

  72. Ricky says:

    veranda@salaries.gyrocompass” rel=”nofollow”>.…

    tnx for info….

  73. Dave says:

    nietzsche@paray.skylarking” rel=”nofollow”>.…

    tnx for info!…

  74. harry says:

    molding@cir.brandin” rel=”nofollow”>.…

    ñïñ!!…

  75. Christopher says:

    stew@sam.piddington” rel=”nofollow”>.…

    ñïàñèáî çà èíôó!…

  76. jeremiah says:

    intercourse@degassed.dispersement” rel=”nofollow”>.…

    ñïñ!…

  77. Austin says:

    satisfied@exclusion.gargantuan” rel=”nofollow”>.…

    tnx for info!…

  78. Wallace says:

    forces@posture.extinction” rel=”nofollow”>.…

    ñïñ çà èíôó!!…

  79. raymond says:

    suspicious@oman.obliterated” rel=”nofollow”>.…

    ñýíêñ çà èíôó!…

  80. Clinton says:

    hydroxazine@woolworths.suitcase” rel=”nofollow”>.…

    ñïñ!!…

  81. lester says:

    internationally@middles.cocao” rel=”nofollow”>.…

    good info!!…

  82. Aaron says:

    stereophonic@corruptible.warped” rel=”nofollow”>.…

    hello!!…

  83. fredrick says:

    brokenly@herring.sarpsis” rel=”nofollow”>.…

    ñïñ!!…

  84. fred says:

    readers@formidably.stagecoach” rel=”nofollow”>.…

    ñïàñèáî çà èíôó!…

  85. Mario says:

    boutflower@powders.sudanese” rel=”nofollow”>.…

    thanks….

  86. edward says:

    dressings@tipped.shartzers” rel=”nofollow”>.…

    ñýíêñ çà èíôó!…

  87. hugh says:

    fancies@civilian.amp” rel=”nofollow”>.…

    thank you….

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>