+ Reply to Thread
Results 1 to 6 of 6

Conditional Formatting by row NAME for multiple tabs

  1. #1
    Registered User
    Join Date
    05-29-2014
    Posts
    5

    Conditional Formatting by row NAME for multiple tabs

    I have a spreadsheet with 150 tabs, I was asked to highlight all numbers under 30 red, in the row labeled TOTAL. The problem is, this row fluctuates between row 6 7 8 or 9 across all tabs... so I cant just simply do it for row 7 across all tabs, or it will highlight an unintended row. Any solution to this? Here's a small portion for reference.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,953

    Re: Conditional Formatting by row NAME for multiple tabs

    Since you didn't post a workbook, the best way to start:
    1. start the macro recorder.
    2. Search for "Total"
    3. When found, select the entire row of data
    4. Suppose "Total" is found in row 8 and you have 10 columns of data (column J). With cells a8 - J8 selected
    Select Conditional Formatting and use "=A8<30" as the test formula.
    5. Apply desired formatting.
    Stop recording.
    The macro can be used as the core to loop through the various tabs. You should post the workbook with the recorded macro and several worksheets with "Total" and some numbers in various rows.


    To attach a Workbook
    (please do not post pictures of worksheets)
    • Click Advanced (next to quick post),
    • Scroll down until you see "Manage Attachments",
    • Click that then select "add files" (top right corner).
    • Click "Select Files" find your file, click "open" click "upload"
    • Once the upload is completed the file name will appear below the input boxes in this window.
    • Click "Done" at bottom right to close the Attachment Manager.
    • Click "Submit Reply"
    Last edited by protonLeah; 05-30-2014 at 12:00 AM.
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    05-29-2014
    Posts
    5

    Re: Conditional Formatting by row NAME for multiple tabs

    I am going to post a spreadsheet with the just two tabs, showing the difference between both tabs, and the complications that come with it (cells being merged, "TOTAL" fluctuating between row 6 and 7, and later 8 and 0).
    Attached Files Attached Files
    Last edited by macroloser; 05-30-2014 at 12:38 PM.

  4. #4
    Registered User
    Join Date
    05-29-2014
    Posts
    5

    Re: Conditional Formatting by row NAME for multiple tabs

    bookey.xlsx

    Please use this one, has < 1 Worksheet

  5. #5
    Registered User
    Join Date
    05-29-2014
    Posts
    5

    Re: Conditional Formatting by row NAME for multiple tabs

    bookey.xlsx
    Here is the file, its just two tabs, but the original is 150, Just wanted to show you how it works. The TOTAL (in caps) row, is the row I need to have highlighted for values that occur below 30, that row fluctuates between rows 6-8 throughout all worksheets. "TOTAL" is also merged to include the percentages (but I can workaround that by using the condition "between" instead of < than).
    Quote Originally Posted by protonLeah View Post
    Since you didn't post a workbook, the best way to start:
    1. start the macro recorder.
    2. Search for "Total"
    3. When found, select the entire row of data
    4. Suppose "Total" is found in row 8 and you have 10 columns of data (column J). With cells a8 - J8 selected
    Select Conditional Formatting and use "=A8<30" as the test formula.
    5. Apply desired formatting.
    Stop recording.
    The macro can be used as the core to loop through the various tabs. You should post the workbook with the recorded macro and several worksheets with "Total" and some numbers in various rows.


    To attach a Workbook
    (please do not post pictures of worksheets)
    • Click Advanced (next to quick post),
    • Scroll down until you see "Manage Attachments",
    • Click that then select "add files" (top right corner).
    • Click "Select Files" find your file, click "open" click "upload"
    • Once the upload is completed the file name will appear below the input boxes in this window.
    • Click "Done" at bottom right to close the Attachment Manager.
    • Click "Submit Reply"

  6. #6
    Registered User
    Join Date
    05-29-2014
    Posts
    5

    Re: Conditional Formatting by row NAME for multiple tabs

    Sub Macro1()
    '
    ' Macro1 Macro
    '
    ' Keyboard Shortcut: Ctrl+a
    '
    Rows("6:8").Select
    Range("B6").Activate
    Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlBetween, _
    Formula1:="=1.0000001", Formula2:="=30"
    Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
    With Selection.FormatConditions(1).Interior
    .PatternColorIndex = xlAutomatic
    .Color = 13551615
    .TintAndShade = 0
    End With
    Selection.FormatConditions(1).StopIfTrue = False
    End Sub


    I used this, but I'm basically just trying to do something like:
    Rows("TOTAL",header=TRUE).Select, instead of Rows("6:8").Select

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] (Perhaps) Conditional Formatting - Tabs
    By DMcC in forum Excel General
    Replies: 12
    Last Post: 03-25-2013, 06:58 AM
  2. Conditional Formatting - Worksheet Tabs
    By Nubbers in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-12-2013, 02:10 AM
  3. print formatting for multiple tabs
    By sbyrum@gmail.com in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 01-07-2013, 07:18 PM
  4. [SOLVED] Conditional Formatting Between Two Sheets/Tabs
    By garrett.grillo in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-27-2012, 07:45 PM
  5. Conditional formatting of tabs (sheets) in a workbook.
    By AdamWest in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-09-2009, 07:29 PM

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