🚀The world's best VBA AI has evolved. ExcelMaster is now an autonomous Agent.Read more →

The ExcelMaster.ai Blog

Excel TIME, HOUR, MINUTE & SECOND — Read and Build the Fraction Behind the Clock

Excel TIME, HOUR, MINUTE & SECOND — Read and Build the Fraction Behind the Clock

A clock time in Excel is a fraction of a 24-hour day — 6:00 AM is literally 0.25. HOUR, MINUTE and SECOND read the pieces out of that fraction; TIME builds a fraction from pieces and quietly wraps past midnight; TIMEVALUE parses a text time into the fraction. Learn the mental model, why HOUR returns 6 for a 30-hour duration, how TIME(25,0,0) becomes 1:00 AM, how to add 90 minutes, and when to reach for arithmetic instead.

Henry
Convert Time to Decimal Hours in Excel — The ×24 Trick (and Calculate Hours Worked)

Convert Time to Decimal Hours in Excel — The ×24 Trick (and Calculate Hours Worked)

A time in Excel is a fraction of a day, so 8:15 is stored as 0.34375, not 8.25. To turn it into decimal hours you multiply by 24 — the single most-searched time formula. Learn why hours × pay rate comes out 24 times too small, how (end − start) × 24 gives hours worked, the MOD trick for night shifts that cross midnight, subtracting unpaid breaks, and rounding billable time to the nearest quarter hour.

Henry
Excel Sum of Time Over 24 Hours — Why Your Total Resets (and the [h]:mm Fix)

Excel Sum of Time Over 24 Hours — Why Your Total Resets (and the [h]:mm Fix)

Add up a column of times and the total reads 1:30 instead of 25:30 — SUM is right, the format is lying. Excel's default h:mm shows only the remainder after whole days, so it wraps at 24 hours. The fix is the custom format [h]:mm, where brackets tell Excel to accumulate instead of roll over. Learn why negative times show #######, how to get a decimal total, and the time-format cheat sheet.

Henry
Excel SIN, COS & TAN — Why =SIN(30) Isn't 0.5 (the Radians Trap)

Excel SIN, COS & TAN — Why =SIN(30) Isn't 0.5 (the Radians Trap)

Excel's SIN, COS and TAN measure angles in radians, not degrees — so =SIN(30) returns -0.988, not 0.5, and Excel never flags it as an error. Learn the one mental model that fixes every wrong trig answer (wrap degrees in RADIANS), why TAN explodes near 90° instead of erroring, and how to keep one angle unit across a sheet.

Henry
Excel ATAN & ATAN2 — Inverse Tangent, Arctan & the Angle From X,Y

Excel ATAN & ATAN2 — Inverse Tangent, Arctan & the Angle From X,Y

The inverse trig functions ASIN, ACOS, ATAN and ATAN2 turn a ratio back into an angle — and they return that angle in radians, so you wrap them in DEGREES. Learn why ATAN can't tell which quadrant you're in, how ATAN2 fixes it, the famous gotcha that Excel's ATAN2(x, y) reverses the argument order used by every programming language, and why ASIN/ACOS of anything outside -1..1 returns #NUM!.

Henry
Excel FV & PV Functions — Future Value, Present Value & the Rule of Five

Excel FV & PV Functions — Future Value, Present Value & the Rule of Five

FV and PV are the same time-value-of-money equation as PMT, solved for a different unknown. Five variables — rate, nper, pmt, pv, fv — and one function per unknown: know any four, get the fifth. Learn the future value of a savings plan, the present value of a stream of payments, the same sign convention (money in is negative), the type argument for annuity-due, and when to reach for RATE and NPER.

Henry
Excel NPV & IRR — Discounted Cash Flow and the Rate of Return

Excel NPV & IRR — Discounted Cash Flow and the Rate of Return

NPV and IRR handle the cash flows PMT and FV can't — the lumpy, irregular ones of a real project. The single biggest mistake, and the whole reason to read this: Excel's NPV assumes the first value arrives one period in the FUTURE, so a time-zero investment must sit OUTSIDE the NPV call. Learn NPV done right, IRR and why it returns #NUM!, the multiple-IRR trap, and why XNPV and XIRR (actual dates) are what analysts really use.

Henry
Excel DSUM & DCOUNT — Sum and Count Rows That Match a Criteria Table

Excel DSUM & DCOUNT — Sum and Count Rows That Match a Criteria Table

DSUM and DCOUNT answer 'total (or count) the rows that match' — but you write the conditions as a small table on the sheet, not inside the formula. Learn the three arguments, why the database must include its header row, how a criteria range encodes AND and OR, why DCOUNT ignores text (use DCOUNTA), and when a visible criteria block beats SUMIFS.

Henry
Excel DGET Function — Extract One Record, and Fail Loudly When There Isn't One

Excel DGET Function — Extract One Record, and Fail Loudly When There Isn't One

DGET pulls a single value from a table using a criteria range — and its defining trait is that it errors on purpose: #NUM! when more than one row matches, #VALUE! when none does. That's not a bug, it's a built-in uniqueness check that VLOOKUP silently skips. Learn the three arguments, multi-condition lookups with no helper column, and when DGET beats XLOOKUP (and when it doesn't).

Henry
Excel Database Functions — DAVERAGE, DMAX, DMIN & Mastering the Criteria Range

Excel Database Functions — DAVERAGE, DMAX, DMIN & Mastering the Criteria Range

The twelve D-functions — DSUM, DCOUNT, DGET, DAVERAGE, DMAX, DMIN and more — all share one signature and one skill: the criteria range. Learn how a criteria block encodes AND and OR, why a range on one field needs its header twice, how formula criteria work (and the header rule that makes or breaks them), the starts-with over-match trap, and the decision tree for D-functions vs SUMIFS vs FILTER.

Henry
Excel GROUPBY Function — Group and Summarize Data With One Formula

Excel GROUPBY Function — Group and Summarize Data With One Formula

GROUPBY(row_fields, values, function) groups rows and aggregates them in a single spilling formula — the modern replacement for the UNIQUE + SUMIFS pattern and, for many reports, for the pivot table itself. The catch that trips everyone: you pass the function by name (SUM, not SUM()), because it's a lambda Excel applies per group. Learn the three required arguments, why it recalculates live where a pivot table goes stale, how to add totals and sort by the aggregated value, and the version it needs.

Henry
Excel PIVOTBY Function — Build a Pivot Table With a Formula

Excel PIVOTBY Function — Build a Pivot Table With a Formula

PIVOTBY(row_fields, col_fields, values, function) is GROUPBY with a second dimension — it cross-tabulates data into a rows-by-columns grid, a pivot table expressed as a single spilling formula that recalculates live with no Refresh. Learn the four required arguments, why row_fields and col_fields are not interchangeable, how to add totals on both axes, and the real trade-off against a classic PivotTable (live and referenceable, but not drag-and-drop interactive). Needs Excel 365.

Henry
GROUPBY & PIVOTBY Advanced — Percent of Total, Multiple Metrics & Custom Aggregations

GROUPBY & PIVOTBY Advanced — Percent of Total, Multiple Metrics & Custom Aggregations

The optional arguments GROUPBY and PIVOTBY share are where they stop replacing pivot tables and start beating them: PERCENTOF for percent-of-total in one word, multiple value columns for several metrics at once, a LAMBDA in the function slot for a weighted average pivot tables can't do, and filter_array to aggregate only the rows you want. Learn the eta-reduced function grammar, the percent-of-total trap, and the errors (#CALC!, #FIELD!, #SPILL!) that tell you which argument is wrong.

Henry
Excel ROW & COLUMN — Get a Cell's Position, Not Its Value

Excel ROW & COLUMN — Get a Cell's Position, Not Its Value

ROW([reference]) returns a row number and COLUMN([reference]) returns a column number — the position of a cell, never its contents. With no argument, each returns the coordinate of the cell holding the formula. Learn the mental model that separates 'where a cell is' from 'what's in it', how ROW()-anchor builds self-healing serial numbers, why MOD(ROW(),n) drives striping and grouping, and the letter-vs-number trap in COLUMN.

Henry
Excel ROWS & COLUMNS — Count the Size of a Range (Not Its Position)

Excel ROWS & COLUMNS — Count the Size of a Range (Not Its Position)

ROWS(array) returns how many rows a range has and COLUMNS(array) returns how many columns — a size, not a position. ROWS(A1:A10) is 10; COLUMNS(A1:C1) is 3. Learn why the plural forms differ from ROW and COLUMN, the killer use of a self-adjusting VLOOKUP column index with COLUMNS(), counting the rows a FILTER returns, and the whole-column trap where ROWS(A:A) is 1,048,576.

Henry
Excel HYPERLINK Function — Build Clickable Links That Update Themselves

Excel HYPERLINK Function — Build Clickable Links That Update Themselves

HYPERLINK(link_location, [friendly_name]) is a formula that builds a clickable jump — to a cell, sheet, file, web page, or email — whose target other formulas can compute. It is not the same as the Insert > Link menu, which creates a static link. Learn the #-prefix for jumping inside a workbook, dynamic targets with ADDRESS and MATCH, why the link navigates on click rather than fetching a value, and why you should always pass friendly_name.

Henry
Excel RAND & RANDBETWEEN — Generate Random Numbers (and Stop Them Changing)

Excel RAND & RANDBETWEEN — Generate Random Numbers (and Stop Them Changing)

RAND() returns a random decimal from 0 up to 1; RANDBETWEEN(bottom, top) returns a random integer in a range, both ends included. Learn the mental model that both are volatile — they re-roll on every edit — why that's the #1 gotcha, how to freeze them with Paste Special, why RANDBETWEEN repeats values, and the =a+(b-a)*RAND() formula for random decimals.

Henry
Excel RANDARRAY — One Formula for a Whole Grid of Random Numbers

Excel RANDARRAY — One Formula for a Whole Grid of Random Numbers

RANDARRAY([rows],[cols],[min],[max],[whole_number]) spills a block of random numbers from one formula — RAND and RANDBETWEEN merged and upgraded. Learn why the whole_number flag defaults to FALSE (so you get decimals unless you ask for integers), why it's still volatile, when it throws #SPILL!, and the SORTBY(list, RANDARRAY(...)) shuffle trick.

Henry
How to Randomly Select, Sample & Shuffle Rows in Excel

How to Randomly Select, Sample & Shuffle Rows in Excel

The one trick behind every random pick in Excel: attach a random number to each row, then sort by it. Learn the modern one-liner TAKE(SORTBY(data, RANDARRAY(...)), n), the classic RAND helper-column method, the critical with-replacement vs without-replacement distinction that ruins samples, and why you must freeze the random column before you sort.

Henry
Excel POWER & SQRT — Exponents, Roots, and the Precedence Traps

Excel POWER & SQRT — Exponents, Roots, and the Precedence Traps

POWER(x,n) and the ^ operator raise a number to a power; SQRT(x) is the square-root shortcut for ^(1/2). Learn the mental model that roots are just fractional exponents, why =-3^2 returns 9 and =27^1/3 returns 9 (both precedence traps), why SQRT of a negative is #NUM!, and how one POWER formula gives you CAGR.

Henry
Excel ABS & SIGN — Absolute Value, Magnitude, and the Sign You Throw Away

Excel ABS & SIGN — Absolute Value, Magnitude, and the Sign You Throw Away

ABS(x) returns a number's magnitude (distance from zero); SIGN(x) returns only its direction as -1, 0, or +1. Learn the mental model that every number is magnitude times direction, why a tolerance check needs ABS(A-B) not A-B, the identity x = SIGN(x)*ABS(x), and why ABS is a tool for when direction truly does not matter — not a band-aid over a sign you did not expect.

Henry
Excel EXP, LN & LOG — Logarithms, Growth Rates, and the Default-Base Trap

Excel EXP, LN & LOG — Logarithms, Growth Rates, and the Default-Base Trap

EXP(x) raises e to a power; LN, LOG10, and LOG are its inverses. Learn the mental model that a logarithm is exponentiation run backwards (solve for the exponent), why LOG(x) with no base is base 10 and NOT the natural log, why LN(0) and LOG of a negative are #NUM!, and the two formulas business users actually need: geometric mean = EXP(AVERAGE(LN)) and years-to-target = LN(target)/LN(rate).

Henry
Excel FORMULATEXT & ISFORMULA — Read and Audit the Formula Inside a Cell

Excel FORMULATEXT & ISFORMULA — Read and Audit the Formula Inside a Cell

FORMULATEXT(reference) returns the formula in a cell as text; ISFORMULA(reference) returns TRUE when a cell holds a formula. Learn the mental model — these functions audit a sheet, they do not calculate — the #N/A you get on a non-formula cell, the conditional-formatting trick that highlights every formula, and when to reach for them instead of Show Formulas.

Henry
Excel CELL Function — Get a Cell's Address, Format, Type, and Filename

Excel CELL Function — Get a Cell's Address, Format, Type, and Filename

CELL(info_type, [reference]) returns metadata about a cell — its address, row, column, number format, content type, or the workbook's filename — instead of its value. Learn the mental model, why info_type is a keyword string, the one job it's still uniquely good at (getting the file path and sheet name), and the recalculation trap that makes it look wrong.

Henry
Excel TYPE & N Functions — Diagnose What Kind of Value You Really Have

Excel TYPE & N Functions — Diagnose What Kind of Value You Really Have

TYPE(value) returns a code for what kind of value a cell holds — 1 number, 2 text, 4 logical, 16 error, 64 array — and N(value) coerces a value to a number. Learn the mental model, how TYPE pins down numbers-stored-as-text, why N('anything') returns 0 instead of erroring, and the classic N() trick for embedding a comment inside a formula.

Henry
Excel SWITCH Function — Replace Nested IFs with a Flat, Readable Formula

Excel SWITCH Function — Replace Nested IFs with a Flat, Readable Formula

SWITCH matches one expression against a list of exact values and returns the first hit — =SWITCH(expr, val1, res1, val2, res2, default). Learn the mental model, why it only does exact equality (and why that is the line between SWITCH and IFS), the default-argument trap that returns #N/A, the SWITCH(TRUE()) trick for ranges, and when to use it instead of nested IF.

Henry
How to Count Unique Values in Excel — The Modern Way and the Classic Formula

How to Count Unique Values in Excel — The Modern Way and the Classic Formula

Excel has no COUNTUNIQUE function, so counting distinct values has two answers: the modern =COUNTA(UNIQUE(range)) in 365/2021, and the classic =SUMPRODUCT(1/COUNTIF(range,range)) for older versions. Learn why blanks add 1 to your count, how to exclude them with FILTER, why the classic formula throws #DIV/0!, and the difference between distinct values and values that appear once.

Henry
Excel TRIM & CLEAN — Strip the Invisible Junk That Breaks Lookups

Excel TRIM & CLEAN — Strip the Invisible Junk That Breaks Lookups

TRIM and CLEAN both remove invisible junk from imported text, but they target different things: TRIM strips extra spaces (ASCII 32), CLEAN strips non-printing control characters (0-31). Neither removes the non-breaking space CHAR(160) that web and PDF pastes leave behind — the #1 reason 'TRIM doesn't work.' Learn the mental model and the one fix that catches everything.

Henry
Excel UPPER, LOWER & PROPER — Change Case Without Mangling Your Data

Excel UPPER, LOWER & PROPER — Change Case Without Mangling Your Data

UPPER, LOWER and PROPER re-case text, but case in Excel is a display and export concern, not a matching one — the = comparison and VLOOKUP are already case-insensitive. The real trap is PROPER: it capitalizes the first letter of every word, mangling McDonald into Mcdonald and iPhone into Iphone. Learn when case actually matters and why PROPER is a starting point, not a finisher.

Henry
Excel LEN Function — Count Characters, and Reveal the Junk You Can't See

Excel LEN Function — Count Characters, and Reveal the Junk You Can't See

LEN counts the characters in a cell, but its real power is diagnostic: because it counts every character including trailing spaces and non-printing ones, LEN is how you prove a cell that looks like 'Apple' is actually 'Apple ' with 6 characters. Learn LEN for validation, the LEN-minus-LEN counting trick, dynamic extraction, and why LEN ignores number formatting.

Henry
Excel VLOOKUP Function — How to Use It, and the 4th Argument That Breaks It

Excel VLOOKUP Function — How to Use It, and the 4th Argument That Breaks It

VLOOKUP looks down the leftmost column of a table and counts N columns to the right — that one-directional design is the source of every bug it has. Learn why the 4th argument (range_lookup) must almost always be FALSE, why VLOOKUP can't look to the left, why a hard-coded column number silently breaks when you insert a column, and how to fix the #N/A that means 'not found'.

Henry
Excel INDEX & MATCH — The Two-Function Lookup That Beats VLOOKUP

Excel INDEX & MATCH — The Two-Function Lookup That Beats VLOOKUP

INDEX and MATCH split a lookup into two jobs: MATCH finds the position ('which row?'), INDEX returns the value at that position ('what's there?'). Decoupling search from retrieval is what gives INDEX/MATCH everything VLOOKUP lacks — it looks left as easily as right, survives inserted columns, and does true two-dimensional lookups. Learn the pattern, the match_type trap, and when it still beats XLOOKUP.

Henry
Excel HLOOKUP & LOOKUP — Horizontal Lookups and the Legacy Function to Retire

Excel HLOOKUP & LOOKUP — Horizontal Lookups and the Legacy Function to Retire

HLOOKUP is VLOOKUP rotated 90 degrees — it searches the first ROW and reads down. LOOKUP is VLOOKUP's ancestor, and its fatal flaw is that it has no exact-match option: it always approximates and demands sorted data. Learn when a horizontal layout makes HLOOKUP the right call, why the classic LOOKUP(2,1/…) trick still shows up in old sheets, and why both mostly give way to XLOOKUP.

Henry
Excel AND & OR Functions — Combine Conditions Right (and Why Excel Never Short-Circuits)

Excel AND & OR Functions — Combine Conditions Right (and Why Excel Never Short-Circuits)

AND and OR don't make decisions — they collapse many TRUE/FALSE tests into one verdict that feeds an IF, a rule, or a filter. Learn why AND belongs inside IF's first argument (not wrapped around nested IFs), why a bare =AND(...) just prints the word TRUE, why Excel evaluates every argument (no short-circuit, so it can still throw #DIV/0!), and when to drop them for +/* array masks.

Henry
Excel NOT & XOR Functions — Invert a Condition, and the "Odd One Out" Logic Most People Get Wrong

Excel NOT & XOR Functions — Invert a Condition, and the "Odd One Out" Logic Most People Get Wrong

NOT flips a single TRUE/FALSE verdict; XOR is the exclusive-or that AND and OR can't express. Learn why NOT takes exactly one argument (so you must write NOT(AND(...)) for compounds), when NOT is just <> in disguise, how De Morgan's law is NOT's real superpower, and the XOR surprise nobody warns you about — with 3+ inputs it returns TRUE for an ODD count of TRUEs, not 'exactly one'.

Henry
Excel IS Functions — ISNUMBER, ISTEXT, ISBLANK, ISERROR & ISNA (Guard a Formula Before It Breaks)

Excel IS Functions — ISNUMBER, ISTEXT, ISBLANK, ISERROR & ISNA (Guard a Formula Before It Breaks)

The IS family inspects a cell and returns a TRUE/FALSE verdict — they classify, they never transform. Learn why ISBLANK is stricter than 'looks empty' (a formula's empty string is not blank), why ISERROR hides real bugs while ISNA and IFNA are usually safer, why IF(ISERROR(x),…,x) computes x twice, and ISNUMBER's killer app: turning SEARCH into a clean partial-match test.

Henry
Excel TEXT Function — Format a Number as Text (and the Trap That Stops It Summing)

Excel TEXT Function — Format a Number as Text (and the Trap That Stops It Summing)

The TEXT function turns a number or date into a formatted text string using a format code — =TEXT(1234.5,"$#,##0.00") gives "$1,234.50". Learn the mental model (baking a format into an actual string vs a cell's display-only number format), the #1 trap (the output is text, so SUM ignores it), the format-code crash course for numbers and dates, leading zeros and locale, and when a cell format, CONCAT, or ROUND is the better tool.

Henry
Excel VALUE & NUMBERVALUE — Turn Text Back Into Numbers That Calculate

Excel VALUE & NUMBERVALUE — Turn Text Back Into Numbers That Calculate

VALUE parses a text string that looks numeric — "1,234.50" or "$9.00" — into a real number you can sum, sort, and chart. It's the inverse of TEXT. Learn the mental model, the #1 real-world cause (numbers stored as text after an import or paste), why VALUE follows your system locale and how NUMBERVALUE fixes a European "1.234,56", the faster no-formula fixes (*1, double-unary, Text to Columns), and why modern Excel coerces some text but SUM never does.

Henry
Excel DATEVALUE & TIMEVALUE — Rescue Dates and Times Trapped as Text

Excel DATEVALUE & TIMEVALUE — Rescue Dates and Times Trapped as Text

A date in Excel is really a serial number wearing a date format; a date that arrives as text is an impostor that won't sort, subtract, or feed DATEDIF. DATEVALUE parses a text date into its serial number and TIMEVALUE parses a text time into a fraction of a day. Learn the mental model, the symptoms of text dates, the regional-ambiguity trap with 03/04/2026, how to combine date + time, when DATEVALUE can't parse a string, and the DATE(LEFT,MID,RIGHT) and Text to Columns alternatives.

Henry
Excel INDIRECT Function — Turn Text Into a Live Reference (and Why It's Volatile)

Excel INDIRECT Function — Turn Text Into a Live Reference (and Why It's Volatile)

INDIRECT turns a text string like "A1" or "Sheet2!B3" into a live cell reference. Learn the mental model, the #1 trap (text doesn't auto-update, so renaming a sheet breaks every INDIRECT with #REF!), why it's volatile and invisible to Excel's dependency tracer, the closed-workbook #REF! gotcha, its one killer use — pulling from a sheet named in a cell — and when a Table, 3D reference, or CHOOSE is the better tool.

Henry
Excel OFFSET Function — A Reference That Moves (and When INDEX Is Better)

Excel OFFSET Function — A Reference That Moves (and When INDEX Is Better)

OFFSET returns a reference a set number of rows and columns from an anchor, optionally resized to a whole block. Learn the mental model, why it returns a reference (not a value) so it can feed SUM, the volatility cost, the classic dynamic-named-range trick and why a Table or spill range now beats it, the #REF! off-the-edge trap, and the key judgment call: use non-volatile INDEX to index into a range, and keep OFFSET only for genuinely moving windows.

Henry
Excel ADDRESS Function — Build a Cell's Address as Text (Not Its Value)

Excel ADDRESS Function — Build a Cell's Address as Text (Not Its Value)

ADDRESS builds the text of a cell address — =ADDRESS(1,1) returns the string "$A$1", not what's in A1. Learn the mental model (it's the opposite of INDIRECT's input side), the #1 misunderstanding that it returns text not a value, the abs_num argument for $ locking, why it is NOT volatile unlike INDIRECT and OFFSET, the real jobs — reporting where a value is via MATCH and building references for INDIRECT — and an honest take on how niche it is in modern Excel.

Henry
Excel SUBTOTAL Function — Totals That Respect Your Filter (and the 9 vs 109 Trap)

Excel SUBTOTAL Function — Totals That Respect Your Filter (and the 9 vs 109 Trap)

SUBTOTAL is a filter-aware total: it skips rows hidden by a filter, so the number at the bottom of your list updates as you filter. Learn the function_num table, the 1–11 vs 101–111 trap (why hiding rows manually doesn't change your total), why SUBTOTAL ignores other SUBTOTALs so grand totals never double-count, and why it can't skip errors — the job AGGREGATE was built for.

Henry
Excel AGGREGATE Function — SUBTOTAL's Superset That Also Ignores Errors

Excel AGGREGATE Function — SUBTOTAL's Superset That Also Ignores Errors

AGGREGATE is SUBTOTAL with two upgrades: 19 functions instead of 11, and an options argument that lets it ignore error values, hidden rows, and nested totals. Learn the function_num + options grid, its most underused trick — summing a column that contains #N/A without any IFERROR cleanup — and the array-form functions (LARGE, SMALL, PERCENTILE) that need an extra k argument.

Henry
Excel INT, TRUNC & MOD — Drop the Decimal and Find the Remainder

Excel INT, TRUNC & MOD — Drop the Decimal and Find the Remainder

INT and TRUNC both drop the decimals, but INT rounds toward minus-infinity while TRUNC just chops toward zero — so they split on negative numbers. MOD returns the remainder, and in Excel the remainder takes the sign of the divisor, not the number. Learn the off-by-one trap, splitting dates from times, and the zebra-stripe pattern.

Henry