+ Reply to Thread
Results 1 to 39 of 39

highlight cell with macro

  1. #1
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    highlight cell with macro

    Hello,
    are max_max and Italian, and I hope that my English is understandable.
    I am looking for a macro that does this:
    I have some columns C - F - I - L - O
    the macro I should highlight in yellow the cells in which there are repeated values
    the macro must also highlight the cell to the right of the found
    Thank you,
    max_max

  2. #2
    Forum Contributor
    Join Date
    04-26-2013
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    167

    Re: highlight cell with macro

    You dont need macro for that

    1:Select the entire columns C - F - I - L - O.

    2: Go into Home

    3: Select Conditional formatting in the style tab.

    4: Select hightlights cell rules, then equal to...

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,968

    Re: highlight cell with macro

    @ extremis I would caution against using entire columns (or rows) with Conditional Formatting. It can become very resource-intensive and slow files down. Rather, confine the range to the largest that you think you will need - you can always increase it later if needed.

    Also, the rule to use for this is "Format Only Unique or Duplicate Values"
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: highlight cell with macro

    hello extremis,
    thanks for the reply but personal needs I use a macro

  5. #5
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: highlight cell with macro

    My problem is this:

    Please Login or Register  to view this content.
    max_max

  6. #6
    Forum Contributor
    Join Date
    04-26-2013
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    167

    Re: highlight cell with macro

    Please Login or Register  to view this content.
    Just change the number 2 for the number that will duplicate...

  7. #7
    Forum Contributor
    Join Date
    04-26-2013
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    167

    Re: highlight cell with macro

    Please Login or Register  to view this content.
    try this one..

    FDibins..thanks, i am currently learning right now and I am trying to learn how to write my own macro

  8. #8
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: highlight cell with macro

    Thanks extremis,
    but to highlight the value is not only one but can more than one and different
    The macro should start automatically when you start Excel
    max_max

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,968

    Re: highlight cell with macro

    Will the duplicated values be across the row, or down the column?

  10. #10
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: highlight cell with macro

    Hello,
    I hope to explain I'm translating from Italian into English with google translator.
    Duplicate values ​​are in columns I've posted before
    max_max

  11. #11
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: highlight cell with macro

    Buongiorno a tutti.
    In Italia sono le 15,00 ( 3 p.m.)

    Good morning everyone.
    In Italy are 15.00 (3 p.m.)

    max_max
    Last edited by max_max; 06-29-2013 at 09:06 AM.

  12. #12
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: highlight cell with macro

    Ciao a tutti,
    posto un esempio per capire cosa cerco.
    Cosa cerco è scritto nel file.
    Un grazie a tutti

    Hello to all,
    place an example to understand what I'm trying.
    What I seek is written to the file.
    Thanks to all

    example1.xlsx

    max_max

  13. #13
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,672

    Re: highlight cell with macro

    Try this
    Please Login or Register  to view this content.

  14. #14
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: highlight cell with macro

    hello Jindon
    I get the macro
    max_max
    Last edited by max_max; 06-30-2013 at 03:51 AM.

  15. #15
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: highlight cell with macro

    Hello,
    jindon you're awesome!
    I tried the macro and it works.
    THREE correction of equipment:

    the macro must always be active must not start with run / macro

    when I delete a value cells must not remain highlighted.

    after the cancellation of the values ​​in columns C / G / I / L / O is highlighted next column D / H / J / M / p

    I hope I explained.
    thanks,
    max_max

  16. #16
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,672

    Re: highlight cell with macro

    Add the code to the sheet module
    Please Login or Register  to view this content.

  17. #17
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: highlight cell with macro

    Hello jindon,
    I do not see your new reply, because of the backup of the forum?
    max_max

  18. #18
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: highlight cell with macro

    hello jindon,
    I now see the new macro and it works fine.
    One problem remains highlighted cells in columns D / G / J / M / P after the delete as an example:
    print_screen 1.jpg
    max_max

  19. #19
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: highlight cell with macro

    hello jindon,
    I now see the new macro and it works fine.
    One problem remains highlighted cells in columns D / G / J / M / P after the delete as an example:
    max_max

  20. #20
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,672

    Re: highlight cell with macro

    Change to
    Please Login or Register  to view this content.

  21. #21
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: highlight cell with macro

    I do not see the second page of the thread!

  22. #22
    Forum Contributor
    Join Date
    08-22-2012
    Location
    nj, us
    MS-Off Ver
    Excel 2010
    Posts
    163

    Re: highlight cell with macro

    you should change ".value=empty" with ".delete"

  23. #23
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: highlight cell with macro

    Non vedo la seconda pagina del thread!
    Mi tocca inserire una nuova risposta.

    I do not see the second page of the thread!
    I need you to reply

    max_max
    Last edited by max_max; 06-30-2013 at 02:14 PM.

  24. #24
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: highlight cell with macro

    Hello jindon
    the macro works, thank you!
    I made a change to the sheet and I added
    values ​​in the range A2: O2 and in the range A35: Q35 and I showed these ranges,
    should not do it.
    print_screen 2.jpg
    max_max
    Last edited by max_max; 06-30-2013 at 02:25 PM.

  25. #25
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,672

    Re: highlight cell with macro

    ..................
    Quote Originally Posted by jindon View Post
    Change to
    Please Login or Register  to view this content.

  26. #26
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: highlight cell with macro

    Hello jindon,
    the macro works, thank you!
    I made a change to the sheet and added values
    in the range A2:O2 and in the range A35:Q35.
    The macro will highlight these ranges,
    should not do it.
    print_screen 2.jpg

    Ciao jindon,
    la macro funziona, grazie!
    Ho fatto una modifica al foglio e ho aggiunto dei valori
    nel range A2:O2 e nel range A35:Q35.
    La macro evidenza questi range, non deve farlo.

    max_max
    Last edited by max_max; 07-01-2013 at 10:03 PM.

  27. #27
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,672

    Re: highlight cell with macro

    Post your workbook instead of picture.

    Picture doesn't help at all.

  28. #28
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: highlight cell with macro

    Hello jindon,
    here's the file.

    Ciao jindon,
    ecco qui il file.


    example 02_07_13.xlsm


    max_max

  29. #29
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,672

    Re: highlight cell with macro

    Just change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.

  30. #30
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: highlight cell with macro

    You are a magician!
    You can remove flicker (not sure if it translates into English exactly) when you insert a new value?
    I tried with:
    Application.ScreenUpdating = False
    Application.ScreenUpdating = True

    Please Login or Register  to view this content.
    but does not change.
    Thanks again.
    max_max

  31. #31
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: highlight cell with macro

    Ciao a tutti gli amici del forum dall'Italia
    Hello to all friends of the forum from Italy

    max_max
    Last edited by max_max; 07-03-2013 at 04:33 PM.

  32. #32
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: highlight cell with macro

    Hello jindon,
    I made a change to the workbook.
    I added a new sheet and now sheet 1/2 are connected.
    If I write a 2 identical numbers in sheet2 the macro test fails.
    Why macro test functions, I have to do macro - run.
    max_max

    Ciao jindon,
    ho fatto una modifica al foglio.
    Ho aggiunto un nuovo foglio e ora foglio 1 /2 sono collegati.
    Se scrivo un 2 numeri uguali nel foglio2 la macro test non va.
    Perchè la macro test funzioni devo farlo da macro - esegui.
    max_max

    example_07_07_13.xlsm

  33. #33
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: highlight cell with macro

    Hello jindon,
    I made a change to the workbook.
    I added a new sheet and now sheet 1/2 are connected.
    If I write a 2 identical numbers in sheet2 the macro test fails.
    Why macro test functions, I have to do macro - run.
    max_max

    Ciao jindon,
    ho fatto una modifica al foglio.
    Ho aggiunto un nuovo foglio e ora foglio 1 /2 sono collegati.
    Se scrivo un 2 numeri uguali nel foglio2 la macro test non va.
    Perchè la macro test funzioni devo farlo da macro - esegui.
    max_max

    Attachment 248466

  34. #34
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,672

    Re: highlight cell with macro

    Delete Worksheet_Change event code and replace with
    Please Login or Register  to view this content.

  35. #35
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: highlight cell with macro

    Jindon you are magnificent, now it works fine!
    Thank you.
    max_max

    Jindon sei magnifico, ora funziona bene!
    Grazie.
    max_max

  36. #36
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: highlight cell with macro

    I made ​​another change to the workbook.
    Now I added a conditional formatting to find equal numbers compared to cell G37,
    it is possible that this research a macro to do it?
    Hello and thank you.
    max-max

    Ho fatto un'altra modifica al workbook.
    Ora ho aggiunto una formattazione condizionale per trovare i numeri uguali rispetto alla cella G37,
    è possibile che questa ricerca lo faccia una macro?
    Ciao e grazie.
    max-max

    example_07_07_13_2_B.xlsm

  37. #37
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: highlight cell with macro

    A help?
    Thank you.
    Regards, max_max

  38. #38
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,672

    Re: highlight cell with macro

    I don't understand what you are asking and I don't like such endless change...

  39. #39
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: highlight cell with macro

    Hello jindon,
    I hope to explain, unfortunately English is not my language and I do the translation with google translator.
    The macro should do what makes the formula
    ENGLISH: COUNTIF (B3, $ G $ 37)
    ITALIAN: CONTA.SE (B3, $ G $ 37)
    find cells that is similar compared to the cell G37
    The macro "test" is "all" repeated numbers, the "new macro" has to find only those
    I write in "cell G37" e li evidenzia.
    I hope I explained.
    max_max

    Ciao jindon,
    spero di spiegarmi, purtroppo l'inglese non è la mia lingua e la traduzione la faccio con google traduttore.
    La macro deve fare quello che fa la formula
    ENGLISH: COUNTIF(B3;$G$37)
    ITALIANO: CONTA.SE(B3;$G$37)
    cioè trovare le celle uguali rispetto alla cella G37.
    La macro "test" trova "tutti" i numeri ripetuti, la "nuova macro" deve trovare solo quelli
    che scrivo nella "cella G37" and highlights them.
    Spero di essermi spiegato.
    max_max

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1