Ravindra BagaleCourses & study guides मराठी Track your progress

2. Data Entry Tools

Excel

2.6 Conditional Formatting: Highlight Rules and Top/Bottom

1. Ask a precise question before you choose a fill

A campus volunteer times food pickups so the club can improve its festival schedule. The work resembles watching an order timer in an app such as Swiggy, but this worksheet contains invented timings for the club's own pickup desk. The supervisor wants to review every wait longer than 15 minutes. A second supervisor wants to discuss the three longest waits at a short meeting. Some days the two requests produce the same three rows. On another day they give very different answers.

Conditional formatting asks Excel to change the appearance of a cell when a rule applies. It reads a stored value or a formula result, then shows a format such as a fill. The original number, text or formula remains available. A fill can help someone find an entry faster. It does not correct, delete, sort or mark the entry complete by itself. Keep the wait number visible and know which question the fill answers.

Threshold, rank and average are different decisions. A threshold follows a specified policy. A rank compares the cells you selected. An above-average rule compares each number with a summary of its current group.

A greater-than 15 rule leaves 15 minutes unhighlighted and highlights 16 minutes. A Top 3 rule compares values in its selected range.
Choose a fixed threshold when the policy is fixed. A top-ranked review depends on the group.

Identify which cells have the answers

Use one request per row. In this example column C holds numeric wait times and its header says Wait (minutes). Do not select the header when the rule expects times. Avoid including a total at the bottom, because an artificial total can become the highest value. A top-ranked rule that includes headers, totals, separate units or unrelated teams can ask a different question from the one you intend.

Test a few entries with ISNUMBER. A number-looking text value can require an import repair before a numeric rule makes sense. A Time cell representing a fraction of a day also differs from a numeric column already measured in minutes. If your data contains a genuine elapsed time, multiply the day fraction by 1440 to create a minute value or set a comparable time threshold. Don't apply a plain 15 to a column whose stored unit is days.

Decide what an actual zero and a missing wait represent. Zero may mean the volunteer could collect immediately. A blank may mean no observation was recorded. If those are different cases, keep both meanings visible. A zero included in the average can lower it. A truly blank worksheet cell is ordinarily ignored by AVERAGE when it is referenced as part of a range. An outcome based on complete observations is only useful when you know how much data is missing.

2. Use Highlight Cells Rules for a condition you can state

Test values at the rule boundary

Choose Home > Conditional Formatting > Highlight Cells Rules and select Greater Than on supported editions. Enter 15 and pick a readable style. Greater Than is strict. It highlights 16 and leaves exactly 15 alone. If the policy says 15 minutes or longer, use a rule with greater-than-or-equal logic, such as a supported custom cell-value condition or formula. Read one sample on each side and one exactly at the boundary.

Suppose two waits are displayed with zero decimal places. A stored value of 15.4 can look like 15 while still meeting a strictly greater-than-15 rule. If the deadline is a true number of minutes, decide how the times are collected and rounded. You can show an extra decimal while checking results. If a business protocol actually uses a rounded whole-minute value, create it explicitly in a labelled calculation column and use the rule there. Display precision and the policy are separate.

Use a highlight rule for the question it can answer
QuestionRuleCheck
Which waits exceed 15?Greater ThanExactly 15 stays outside
Which amounts are between two accepted limits?BetweenTest each endpoint and an out-of-range value
Which labels contain a known word or phrase?Text that ContainsA longer phrase can match as well. Test it.
Which numeric dates fall in a supported relative window?A Date OccurringVerify its relation to the date your workbook uses now.
Which IDs appear more than once?Duplicate ValuesReview both copies before taking action.

Distinguish an exact category from a substring

Text that Contains can highlight a phrase within a longer note. If you search for Ready, a cell saying Not ready contains the word as well. That is useful if the question really is "which notes mention readiness?" Use an equality-based rule on a controlled status field if the question is "which request is ready?" Open an example with both words competing before handing the colour to an editor who will act on it.

Excel supports wildcard characters in some search and text conditions. A question mark or asterisk can have a pattern meaning, depending on the rule. If a label such as Stage* contains a literal symbol, check the application's wildcard and tilde escaping instructions or use a formula with an explicit text comparison. Make a small test rather than trusting a preview that happens to match the simple cases.

Read date rules with their time window in mind

A Date Occurring rule can be useful for a date category such as today or a near-term window. The result depends on the evaluation date and option. A highlight that appeared in last week's screenshot can be gone tomorrow without anyone editing the order. Confirm that cells contain real dates and read the policy's date boundary. If a compliance report needs a fixed historical window, use explicit start and end dates in a reported condition so the result can be reproduced later.

3. Compare a rank with a fixed target

Choose a shortlist quantity based on the review you can run

On supported desktop editions choose Conditional Formatting > Top/Bottom Rules > Top 10 Items, then change the requested number in the dialog. For our example, change it to 3. This selects a high-ranked portion of the range. It helps the coordinator decide which examples to discuss first. It cannot establish that any of those records crossed a fixed target. If all eight waits are between two and twelve minutes, the top three are still the longest three in that group.

The same distinction holds for Bottom Items and for percentage-based ranking. Bottom Three describes a fixed-size request for low-ranked values. Bottom 20% describes a low-ranked share of the selected population, not all values under 20. A change to the group can move the cutoff. If the group is small or has ties near the cutoff, inspect the actual highlighted count. The lesson's independent cutoff exercise makes the treatment of ties explicit for a review mailing list.

Use above or below average for a comparison to the group

Above Average compares the value with the current group average. How many items are above it depends on the shape of the data. For three waits of 7, 8 and 30 minutes, the mean is 15 minutes. The wait of 30 moves the average far above the two ordinary waits. If the supervisor wants to flag any request slower than a promised 10 minutes, the number to use is 10. The mean is useful if the supervisor wants to learn how the current group is behaving.

Keep the grouping meaningful. A club can run separate sessions at midday and in the evening. If the catering team expects requests to be ready faster during the quiet slot, an overall average can hide the issue. Compare similar units and reporting periods. Use a helper or a separate summary when the question calls for a different threshold per group. A built-in average rule should be read in light of its Applies To range.

4. Inspect what is stored before calling something a duplicate

A repeated ticket ID could come from one of several situations. A first volunteer logged the initial pickup and a second added a note in a new row. Two separate transactions could have been assigned the same local number by mistake. A supplier receipt might legitimately appear on several line items. Apply Duplicate Values to the identity column to direct attention to the source. Decide what a duplicate means before making changes.

  • Select the column whose values should be unique. Duplicates in the price column are ordinary if two products cost the same amount.
  • Check that the shared identifier has its original type and fixed characters. A transformed code can collapse leading zeros or mix two values already damaged by import.
  • Use the highlight as a review cue. Verify one repeated key against both records and the source. Avoid deleting either row until someone confirms which record to keep or merge.
  • When a duplicate means a combination of fields, such as the same receipt and line number, create a validated combined key or use a matching formula for the required fields. One repeated cell does not establish a repeated record.

Some text comparison rules can be affected by Excel settings and how the source represents characters. An ID with a trailing ordinary space or a text/numeric mix may be hard to spot. Make a tiny check with the exact types you expect. If case matters, use a documented exact-text comparison separately, because standard counting or string comparisons may ignore capitalisation.

In a quote list, the top three figures are 2750, 2000 and 1400. Under a fixed minimum of 2000, only 2750 and 2000 qualify. A table illustrates both outcomes.
The third-highest quote can make a shortlist while falling below the fixed review threshold.

5. Lab. Highlight pickup delays and repeated ticket IDs

Goal. Compare a strict delay threshold with a duplicate identifier alert. Use one empty sheet. Enter the following values in A1:C9. Every duration is a numeric number of minutes. The 0 is one observed immediate pickup, not an empty input. The repeated ticket is deliberate and may represent a second note about the same incident.

Fictional campus pickup log
Request IDCounterWait (minutes)
Q-01Library8
Q-02Sports Hall15
Q-02Sports Hall16
Q-04Cafeteria22
Q-05Library0
Q-06Arts Block12
Q-07Cafeteria19
Q-08Arts Block15

Build a visual check and verify its exact result

  1. Apply a fixed delay threshold

    Select C2:C9. Choose Home > Conditional Formatting > Highlight Cells Rules > Greater Than. Enter 15 and a high-contrast fill. The wait values 16, 22 and 19 qualify. Both 15s should remain unhighlighted by this rule. Read the cell value rather than guessing it from the fill.

  2. Count the delays independently

    In a spare cell type =COUNTIF(C2:C9,">15"). It should return 3. Check the two delays of exactly 15. Then use =COUNTIF(C2:C9,">=15") to see how a policy that includes equality would count 5. Decide which question the coordinator asked before changing the rule.

  3. Mark repeated identifiers separately

    Select A2:A9 and apply Duplicate Values. Excel should mark both Q-02 IDs, in A3 and A4. Their wait cells differ. One wait meets the strict threshold and one does not. That difference is a useful reason to inspect the source. The two marks should be on the ID cells because the repeated identifier is what the rule checks.

  4. Find and inspect the actual scope

    Open Conditional Formatting > Manage Rules on a desktop version with the full manager. Read Applies To for both rules, one covering C2:C9 and the other A2:A9. If an Excel edition presents the manager differently, inspect the rule applied to a selected sample cell. Change C3 from 15 to 17 on a copy, and expect four strict delays. The duplicate ID display should still flag the two same identifiers.

  5. Remove only a test rule after comparing

    Undo or restore the test value. Clear the rules from the selected wait cells on the practice copy or remove the particular rule in the manager. Recheck that all the wait numbers and the duplicate-ID rule remain available. Conditional formatting can be removed while preserving the worksheet data and rules elsewhere.

For a helper status, enter =IF(ISNUMBER(C2),IF(C2>15,"Review wait","Within limit"),"Check wait input") in D2 and fill it down. This gives you an explicit label that can be filtered or exported. In the sample, the same three numeric waits are review cases. Change one wait to text or clear a cell in a duplicate and read Check wait input. Leave a reminder that the sheet measures recorded wait, not why the delay happened.

Try an Above Average rule on a separate copy of C2:C9. The eight waits sum to 107, with a mean of 13.375. Values 15, 16, 22, 19 and 15 are above that number, so there are five qualifying wait cells. An average comparison can model the group without capturing your chosen service standard. In this sample both 15s are above the mean but don't exceed the fixed 15-minute threshold.

6. Lab. Shortlist high quotes and define a tie policy

Goal. See the difference between a Top Items display and a fixed approval threshold. Use a new sheet for the following fictional sponsor quotes. All figures are in INR and are simply practice amounts. The coordinator has time to review three quotes initially. The club also uses a policy of checking every quote of at least 2000 INR. Keep the report's two flags identifiable.

Enter the quote list in A1:B8
Quote IDQuoted INR
S-011040
S-02230
S-032000
S-04450
S-051400
S-062750
S-07900
  1. Find the top three with an Excel rule. Apply Top 10 Items to B2:B8 and replace the count with 3. In this untied dataset expect 2750, 2000 and 1400. Use =LARGE(B2:B8,3) to check the third largest number. It should return 1400. If more cells seem highlighted, check the rule order and whether another rule also applied a similar fill.
  2. Check the policy separately. In C2 enter =IF(B2>=2000,"Second review","Ordinary review") and fill down. The quote IDs S-03 and S-06 need the second review. The 1400 quote appears in the shortlist due to its relative position, but receives Ordinary review under the fixed policy. This distinction matters when people assume every highlighted quote requires sign-off.
  3. Try a tie at a cutoff. In a duplicate replace B2 with 2000 and imagine a top-two request. =LARGE(B2:B8,2) gives 2000. A rule that includes every quote at or above that cutoff intentionally chooses three rows: the 2750 and both 2000s. Use =COUNTIF(B2:B8,">="&LARGE(B2:B8,2)) to verify the tie-inclusive count. Check actual native Top Items highlights separately where ties matter.
  4. Build a deterministic tie-break for the rehearsal. Suppose the practice group selects the earliest displayed row in a tie, with the ordering defined before the review. In D2 type the rank formula below and fill through D8. Apply a simple helper check for rank 2 or lower. The top two are S-06 and S-01 in this particular order. The older S-03 row ties on amount but appears later than S-01 in the current sheet.
=IF(ISNUMBER(B2),COUNTIF($B$2:$B$8,">"&B2)+COUNTIF($B$2:B2,B2),"")

Explain why the two parts give a unique rank

For a numeric quote, the first count is how many amounts are strictly greater. For either quote of 2000 there is one higher amount, 2750. The second count reads the expanding prefix ending at the current row. For the first 2000 it returns one. For the second it returns two. The ranks are therefore 2 and 3. Checking the numbers by hand makes it clear why the formula resolves a tie.

The formula's tie-break depends on worksheet order. If the owner intends an actual timestamp or documented priority code to determine precedence, implement that as the tie-break and keep the source order verifiable. Sorting the sheet can change the worksheet-order tie-break. Use the formula in a practice sheet where all quotes are numeric and where you deliberately choose that tie policy. For active or inactive rows, define which belong to the ranking table before using a cutoff.

When there are fewer records than the requested k, LARGE can return an error. In a changing workbook, check COUNT before asking for a third qualifying observation. A group with two numeric values has no third largest numeric value. Report the actual sample size rather than showing a misleading zero cutoff. Similarly, if blanks represent missing quotes, keep them out of the numeric review and do not treat them as low offers.

7. Make the highlight useful on the next shift

Read rule precedence when styles overlap

A developer intern might stack a Greater Than rule and a Top Items rule on the same range. Both can be true for one cell. If they try to set the same fill, the higher-priority conflicting format wins. Where the rules set different properties, the visible result can combine them. In Manage Rules, verify which rules apply to the actual cells and what order they are evaluated in. For an applicable control such as Stop If True on a formula or other supported rule, a true higher rule can stop lower ones from being evaluated.

Consider a low-stock sheet that you receive from a club borrowing tripods. One rule marks a low quantity and another marks a critical record. If one red fill is the only visible signal, it may be unclear whether the record is both critical and low. Keep the quantities and explicit labels. Use a text-based checklist to guide action, then pick a small number of visual cues to make the important rows easier to find. An icon or colour should not silently cancel a stored condition.

Check new rows and verify the data did not move

A conditional format never moves a row by itself. You can explicitly filter or sort by format in supported Excel editions, but a visible row comparison and an action on the order of records are separate operations. If you sort, select the whole table so the ticket ID stays with the wait and location. The previous formula rank may update if it uses row order as a tie-break. Read the rules before mixing a visual review with permanent changes to the source.

Use a duplicate to test the first row below the current range. Enter an unmistakable wait such as 45 minutes. If the row stays unnoticed, verify its number type and the effect of applying the rule to the next relevant row. Unnecessarily wide full-column rules can include irrelevant cells and make everyday inspection harder. Use a clear list or Table boundary, then test it each time the data grows in a new way.

Test the time window in a separate record size

Suppose the club wants to report all pickup incidents recorded from 16 through 20 November 2026. Its Date Occurring dropdown can express a moving period, but a report for those five particular days needs a fixed start and end. In a spare sheet put =DATE(2026,11,16) in H2 and =DATE(2026,11,20) in H3. In A2 enter =DATE(2026,11,20)+TIME(17,0,0). In A3 enter =DATE(2026,11,21). Format A2:A3 to show both the day and any time in an appropriate desktop display. The first is inside the period, and the second is just outside it.

In B2 use =IF(ISNUMBER(A2),AND(A2>=$H$2,A2<$H$3+1),FALSE) and fill down to B3. Read TRUE and FALSE. A2 contains a fractional part after 20 November midnight, and the chosen window includes the whole of 20 November. The strict comparison with the day after H3 makes the midnight of 21 November the first excluded instant. A rule with A2<=$H$3 would still include 20 November midnight, but would exclude its afternoon. The formula uses a fixed range that another person can reproduce when the current date changes.

You can use B2:B3 as a simple source of a visible check, or use the same expression in a formula-based rule for A2:A3. Confirm dates are genuine numeric serials and the time basis comes from the same source. A date/time format cannot convert between a source time zone and local time. If the source dates are imported as text, resolve the type first and retest the same time boundaries. This practice isolates the boundary logic from the calendar words you happen to see.

Add an outlier to see a relative rule change

In a copy of the wait lab, append one additional observed wait of 40 minutes. Update the range used by the average comparison to include it, or deliberately expand the Table source. The old group mean of 13.375 becomes approximately 16.33 because the total is now 147 across nine waits. The waits 22, 19 and 40 are above the new mean. The earlier values of 15 and 16 no longer qualify even though nobody edited those records. The fixed threshold greater than 15 still finds 16, 22, 19 and now 40. Review both answers side by side.

For a second comparison, use Bottom Items to inspect the smallest two numeric waits in the original data. The values are 0 and 8. If zero is a confirmed immediate pickup, it belongs. If zero was inserted in the source to stand for no recorded measurement, treating it as a small wait would be misleading. Agree on a missing-value convention. Preserve unknown inputs as explicit unknowns in a separate reporting field if you need a numeric comparison over real elapsed times only.

Check the review list after applying a filter

In the original wait log, the Cafeteria records have waits of 22 and 19, while Library has 8 and 0. The full sheet has three waits above 15. Filtering the table to Cafeteria hides the other records on screen. COUNTIF(C2:C9,">15") still returns 3 because its comparison uses the whole referenced range. If the coordinator asks about the visible rows, define a separate visible total and use a helper.

Use E1 as Delay flag. In E2 enter =IF(ISNUMBER(C2),IF(C2>15,1,0),0), then fill through E9. The zeros here are flags, not minutes. With the filter off, =SUM(E2:E9) gives 3. On editions where the filtering and SUBTOTAL options are available, apply a normal row filter on the three core data columns or the table, then use =SUBTOTAL(109,E2:E9) outside the filtered data. It sums visible flags, also ignoring manually hidden rows. With Cafeteria selected expect 2. With Library selected expect 0. Clear the filter and verify the original count returns.

Use a note such as Visible delays in current filter for the second number. It prevents a screenshot of two highlighted rows from being mistaken for the full workload. It also reminds the next reader that visual filter scope may differ from a separate rank or average calculation that still looks at the entire assigned range. State which rows the teaching workbook is counting before interpreting any color.

Let visible styling support a multi-step review

Suppose each pickup has a result field stating Checked or Needs a call. The rule for an overlong wait should answer only whether the wait exceeded 15 minutes. If the coordinator also needs to know whether someone followed up, use a separate status column. One conditional format around the time and another distinct cue around the follow-up status can each mean one thing. A volunteer should be able to recognise the reason by reading the column headings and values without knowing all the palette choices.

If two rules use red fills differently, use the manager to inspect their exact ranges and conditions. A 22-minute wait can be both above the limit and in the top three. You can make the delay flag use a fill and the ranking use a small border or a visible separate helper. Test the two answers using their corresponding calculations. The support call should ask about all above-limit rows, and the short review meeting might still show only three rows.

If you copy a finished formatted block into another sheet, the destination can acquire a copied rule with adjusted references. Review whether those references still point to the intended cells, particularly for formula-based rules. Pasting only values can be useful when the recipient already has a separate format template. The copied data can include unexpected types or duplicates either way, so verify the first new row, the last imported row and a source row that should not have changed.

Describe both the human decision and the calculation

A meaningful rule has a title you can explain. Review waits over 15 minutes tells a reader the acceptance boundary. Top three among this week's observed waits states a comparison group. Duplicate ticket IDs in the pickup log tells the person to inspect records before altering them. Use ordinary labels in the figures, charts or filters so a screenshot can still be understood by somebody who was not in the meeting where the rule was created.

Share a copy with one deliberate rule removed as an exercise. Ask a teammate to identify which values are still in the sheet and which colour cue is absent. This teaches that the current style can be undone without rewinding source records. Restore the expected rule and run one quick stored-value check. When the workbook is used repeatedly, add these small checks to its instructions rather than relying on the original author to know where every rule lives.

Let an authorised editor change a visible policy cell

For another version of the wait lab, put the label Review threshold (minutes) in H1 and a numeric 15 in H2. In a scratch area use =IF(AND(ISNUMBER(C2),ISNUMBER($H$2)),C2>$H$2,FALSE) and fill it through the same eight records. The comparison reads the current wait and the one fixed threshold. You can count the TRUE results or use the same expression in a supported formula-based formatting rule. Fixing H2 makes the lower cells compare with the same limit. The upcoming formula rule lesson develops this approach for more than one column.

Change the threshold to 18 in the practice copy and read the qualifying records. They should be the waits of 22 and 19. Change the threshold to 22 and no wait strictly exceeds it. These tests make the declared boundary visible. If H2 is blank, this formula returns FALSE, and that outcome by itself would look like no delays. Pair it with an explicit message when the threshold is missing, such as Enter a numeric review threshold. A lack of highlight can mean no observations qualify, or it can mean the policy has not been supplied yet.

Record who can edit that threshold. A team may expect it to be adjusted only when a documented service target changes. Someone reviewing a historical chart needs to know whether its flags were generated under the original target or the new target. Keep that decision in the workbook notes. For a report that needs to preserve original results, keep the original input, the relevant policy and the issued copy of the output together.

As a final check, list which decisions must still be made by a person. The delay rule says when to investigate, and the duplicate rule says which identifier to inspect. A restocked tray, a corrected timer reading or a valid split receipt can explain the original flag. Record the reason beside the source row or in a review log. Clearing the highlight without recording the conclusion makes the next shift repeat the investigation.

Try another short dataset in the existing Excel Task Hub. Write down the comparison scope, choose the key boundaries, and count qualifying rows before applying a colour.

8. Interview questions with practical answers

When would you pick Greater Than instead of Top Items?

When I need a fixed policy, such as every wait above 15 minutes, I use Greater Than and test the exact boundary. Top Items compares the selected range and is useful for a shortlist when the largest observations matter.

Why might a visible 15 be highlighted by a rule for values above 15?

The worksheet may display a rounded number. Inspect the underlying value or increase the number of decimals in a copy. A stored 15.4 qualifies against 15 even if the displayed value rounds to 15.

What does a duplicate ID highlight prove?

It says more than one selected cell matches under the rule's comparison. It does not tell me which source record was correct or whether the repeated key is a legitimate second line. I check the full records before merging or deleting anything.

How would you shortlist exactly two rows when two quotes tie for second?

First agree on a tie policy. If every matching cutoff value belongs in the review, expect three rows. If the policy needs exactly two, use a documented tie-break such as earliest approved request, then verify which row gets the second position.

What do you inspect when a new record does not receive the expected highlight?

Check its stored value and type. Read the rule and Applies To range, then inspect priority for conflicting formats. Test a known valid and invalid example on the actual new row.

9. Predict the qualification before opening the answer

  1. Should an exactly 15-minute recorded wait satisfy the rule Greater Than 15?

    Answer and reasoning

    No. Strictly greater means the value has to exceed 15. Greater-than-or-equal would include the boundary.

  2. If the top three quotes are 2750, 2000 and 1400, how many also meet a fixed minimum of 2000?

    Answer and reasoning

    Two. Equality meets the fixed minimum. A quote can be top-ranked without crossing that minimum.

  3. Why might Text that Contains Ready highlight Not ready?

    Answer and reasoning

    The cell includes the substring. For exact workflow state, use an equality-based rule on a dedicated status field.

  4. Can the average change after an additional valid wait without any old wait changing?

    Answer and reasoning

    Yes. Adding a number changes the comparison group. An above-average rule may now flag different records.

  5. Will a rule on A2:A9 for duplicate IDs also automatically correct the wait at C4?

    Answer and reasoning

    No. The rule formats qualifying ID cells. Someone still needs to verify the stored wait and identity against the source.

10. Six things to check on the next report

  • Define the condition

    Write the rule in terms of the real unit and check an equal value before deciding whether it qualifies.

  • Check the exact range

    Exclude titles and totals that do not belong. Test the first newly added record.

  • Choose the right comparator

    A fixed threshold measures a policy; rank and average depend on the selected group.

  • Keep a text or numeric witness

    Count the qualifying records and retain their numbers or a helper status for people who do not see the fill.

  • Treat duplicates as a review

    Find both source records and determine what their repeated field means before changing data.

  • Make ties deliberate

    State whether all cutoff values belong or an explicit tie-break chooses a fixed number of records.

Microsoft references