Consulting

Page 2 of 2 FirstFirst 1 2
Results 21 to 33 of 33

Thread: Delete all conditional formatting and coloring conditional on specific rows

  1. #21
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,743
    Location
    Interesting

    I'm running 365 and Excel apparently handles string conversions a little differently between the two versions

    The test works in mine

    ?application.Version
    16.0
    
    
    ?typename (application.Version)
    String
    
    
    ? Application.Version > 12 
    True
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  2. #22
    VBAX Tutor
    Joined
    Sep 2012
    Location
    London
    Posts
    264
    Location
    Hello,
    I was really surprised, but apparently and I think it's normal to have some small changes that change the work of the macros.
    Things are changing so much that I feel like at some point we can't keep up with them at the same pace.

  3. #23
    VBAX Tutor
    Joined
    Sep 2012
    Location
    London
    Posts
    264
    Location
    Hi Paul, I want to ask you for one last help, there is a place where I am messing up the rows and columns by trying to apply the coloring already in the original table.
    I'm trying (because you write with numbers what to start from, not with the names of the columns) and it clearly confuses me in the arrangement.
    I am uploading the 100% original columns, exactly as they are in the table.
    I would be very grateful if you would just rearrange them, and I will look, then where I went wrong.
    Attached Files Attached Files

  4. #24
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,180
    Location
    Imagine what would have happened if kOst4din had been honest and said he was using version 2007 at the very start of this this thread.
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  5. #25
    VBAX Tutor
    Joined
    Sep 2012
    Location
    London
    Posts
    264
    Location
    Hello Aussiebear,
    exactly what I should have imagined to be honest.
    lest you think that if I had known, I would have hidden it (I had absolutely no idea that I could get to such a problem with this office 2007).
    Are you making fun of me, with all due respect to you and every single person on the site.

  6. #26
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,743
    Location
    Quote Originally Posted by k0st4din View Post
    Hello Aussiebear,
    exactly what I should have imagined to be honest.
    lest you think that if I had known, I would have hidden it (I had absolutely no idea that I could get to such a problem with this office 2007).
    Are you making fun of me, with all due respect to you and every single person on the site.
    No one is making fun - many times there's a "WHY did that not work???" type of question that eventually turns out to a version difference where someone did not realize that Excel versions sometimes work a little differently.

    It's just helpful to know what version someone is using (many people don't say anyway) so that if it works for me using 365 but not for you using 2007, then that's a start to investigate version differences (I should have looked sooner )

    By the by, your workbook seems to work fine with your column number changes. What were you seeing that was not right?

    I comment out the 365 CF format to force the .Interior verion to run and it seems to be as expected
    Attached Files Attached Files
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  7. #27
    VBAX Tutor
    Joined
    Sep 2012
    Location
    London
    Posts
    264
    Location
    Hello, I came across this macro and would like to ask how it can be added, instead of clicking in each individual worksheet, to tell it to perform these actions on mentioned (selected) worksheets.
    I mean in worksheets for example: Cucumbers, London, Market, Shops.
    Thank you in advance.

  8. #28
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,743
    Location
    I think if you add the Sub RemoveOnAllWorksheets and change the 2 lines it will do all worksheets

    If you add the Sub RemoveOnSelectedWorksheets and change the 2 lines it will do all only the selected worksheets




    Sub RemoveOnSelectedWorksheets()     '   <<<<<<<<<   new sub
        Dim i As Long
        Dim ws As Worksheet
        For i = 1 To ActiveWindow.SelectedSheets.Count
            Set ws = ActiveWindow.SelectedSheets(i)
            Call DoAllRows(ws)
        Next i
    End Sub
    
    
    Sub RemoveOnAllWorksheets()     '   <<<<<<<<<   new sub
        Dim ws As Worksheet
        For Each ws In ActiveWorkbook.Worksheets
            Call DoAllRows(ws)
        Next
    End Sub
    
    
    Sub DoAllRows(ws As Worksheet)  '   <<<<<<<<<<<<<< change
        Dim r As Long
        Application.ScreenUpdating = False
        With ws                     '  <<<<<<<<<<<<<<<<< change
            With .Range("DO3:DZ60") 'tova e diapazona v koti trqbva da se iztriqt vsichki condittional
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  9. #29
    VBAX Tutor
    Joined
    Sep 2012
    Location
    London
    Posts
    264
    Location
    Hi Paul, I may not have asked my question correctly. Not in all, but only in mentioned ones. If I have, for example, 8 worksheets, I should say in which to perform this action, for example, in 5 selected ones. I don't know how to do I think it was Array("Peaches", "Something else"). Thanks in advance!

  10. #30
    VBAX Tutor
    Joined
    Sep 2012
    Location
    London
    Posts
    264
    Location
    P.S. Just to add to the question. This macro checks for specified rows that have values ​​at the end of the table and colors where appropriate. Which is great! And can something be changed so that it does the same thing again, but on the rows specified for this, but I should say which columns (cells)? That is, for example: row 75, columns for example AC, AF, AI, AM, etc. I will modify them according to my table, but to get the idea. That is, not to color the entire row according to the set criteria, but to make the check in the specific cells. Thanks again for your help!

  11. #31
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,743
    Location
    Quote Originally Posted by robinho0d View Post
    Hi Paul, I may not have asked my question correctly. Not in all, but only in mentioned ones. If I have, for example, 8 worksheets, I should say in which to perform this action, for example, in 5 selected ones. I don't know how to do I think it was Array("Peaches", "Something else"). Thanks in advance!

    If you select multipe tabs (control+click) then this

    Sub RemoveOnSelectedWorksheets()     '   <<<<<<<<<   new sub
        Dim i As Long
        Dim ws As Worksheet
        For i = 1 To ActiveWindow.SelectedSheets.Count
            Set ws = ActiveWindow.SelectedSheets(i)
            Call DoAllRows(ws)
        Next i
    End Sub
    else something like this (not tested)

    Sub RemoveFromArray()     '   <<<<<<<<<   new sub
        Dim i As Long
        Dim A As Variant
        Dim ws As Worksheet
        A = Array("One", "Two", "Three")
        For i = Lbound(A) To UBound(A)
            Set ws = Worksheets (A(i))
            Call DoAllRows(ws)
        Next i
    End Sub
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  12. #32
    VBAX Tutor
    Joined
    Sep 2012
    Location
    London
    Posts
    264
    Location
    Hi Paul_Hossler
    I am very sorry for the long delay and return of the reply.
    Both options are great as a macro supplement.
    I just have no words to thank you for your prompt assistance.
    Now instead of clicking so many times for each worksheet, things happen to me with just one click, which is great and saves me a lot of time.
    Thank you very much!
    Be alive and healthy Paul_Hossler!

  13. #33
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,743
    Location
    Quote Originally Posted by k0st4din View Post
    Hi Paul_Hossler
    I am very sorry for the long delay and return of the reply.
    Both options are great as a macro supplement.
    I just have no words to thank you for your prompt assistance.
    Now instead of clicking so many times for each worksheet, things happen to me with just one click, which is great and saves me a lot of time.
    Thank you very much!
    Be alive and healthy Paul_Hossler!
    No problem -- life happens and lots of times a requester doesn't come back with a 'Thanks' or 'That works' or 'I learned something and tweaked it myself' so we never know


    Glad it's doing what you wanted

    Feel free to ask more questions if you need
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

Tags for this Thread

Posting Permissions

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