Excel formulas for Data Analysts

Below formulas are the backbone of Excel for Data Analysts. If you master them + PivotTables, you’ll handle 90% of real-world tasks.

CategoryFormula (Syntax)ExampleResultWhat it does
Aggregation=SUM(range)=SUM(A1:A5) where A1:A5 → 2,3,5,10,2040Adds numbers in a range
Aggregation=AVERAGE(range)=AVERAGE(10,20,30,40,50)30Mean of values
Aggregation=MEDIAN(range)=MEDIAN(10,20,30,40,50)30Middle value
Aggregation=MIN(range) / =MAX(range)=MIN(4,7,1) / =MAX(4,7,1)1 / 7Smallest / largest
Aggregation=COUNT(range)=COUNT(4,”x”,7,””,9)3Counts numeric cells
Aggregation=COUNTA(range)=COUNTA(4,”x”,7,””,9)4Counts non-empty cells
Aggregation=COUNTBLANK(range)=COUNTBLANK({“a”,””,”b”})1Counts blanks
Aggregation=ROUND(number,digits)=ROUND(12.345,2)12.35Round to decimals (ROUNDUP/ROUNDDOWN as needed)
Aggregation=SUMPRODUCT(array1,array2)=SUMPRODUCT({2,3,5},{10,20,30})220Weighted sums / conditional math
Aggregation=SUBTOTAL(function_num,ref)=SUBTOTAL(9,A1:A10)(sum of visible)Ignores filtered rows (9=sum, 1=avg, etc.)
Conditional=SUMIF(range,criteria,[sum_range])=SUMIF(B2:B6,”>50″,C2:C6)1200Sum by one condition
Conditional=SUMIFS(sum_range,crit_rng1,crit1,…)=SUMIFS(C:C,A:A,”East”,B:B,”Q1″)(sum)Sum by multiple conditions
Conditional=COUNTIF(range,criteria)=COUNTIF(A:A,”>=60″)(count)Count by one condition
Conditional=COUNTIFS(range1,crit1,…)=COUNTIFS(A:A,”Done”,B:B,”<=31-Jan-2025″)(count)Count by multiple conditions
Conditional=AVERAGEIF(range,criteria,[avg_range])=AVERAGEIF(B:B,”North”,C:C)(avg)Average by one condition
Conditional=AVERAGEIFS(avg_range,crit_rng1,crit1,…)=AVERAGEIFS(C:C,A:A,”Store A”,B:B,”>=01-Jul-2025″)(avg)Average by multiple conditions
Logic=IF(test,true_value,false_value)=IF(65>50,”Pass”,”Fail”)PassConditional output
Logic=IFS(test1,result1,test2,result2,…)=IFS(A2>=90,”A”,A2>=75,”B”,A2>=60,”C”,TRUE,”D”)A/B/C/DMultiple conditions without nesting
Logic=AND(cond1,cond2)=AND(A2>50,B2=”Yes”)TRUE/FALSEBoth must be TRUE
Logic=OR(cond1,cond2)=OR(A2>50,B2=”Yes”)TRUE/FALSEAny TRUE returns TRUE
Logic=NOT(logical)=NOT(TRUE)FALSENegates TRUE/FALSE
Error=IFERROR(value,value_if_error)=IFERROR(1/0,”NA”)NAReplace #DIV/0!, #N/A, etc.
Checks=ISNUMBER(cell) / =ISTEXT(cell) / =ISBLANK(cell)=ISNUMBER(A2)TRUE/FALSEType checks for cleaning
Lookup=VLOOKUP(lookup,table,col,FALSE)=VLOOKUP(101,A2:D10,2,FALSE)(e.g., “Rahul”)Vertical lookup (legacy)
Lookup=HLOOKUP(lookup,table,row,FALSE)=HLOOKUP(“Q1”,A1:H4,3,FALSE)(value)Horizontal lookup (legacy)
Lookup=INDEX(range,row,[col])=INDEX(C2:C6,3)3rd item in C2:C6Return value by position
Lookup=MATCH(lookup,range,0)=MATCH(“Banana”,B2:B6,0)(position)Position in a range
LookupINDEX+MATCH=INDEX(C2:C6, MATCH(“Banana”,B2:B6,0))(price of Banana)Flexible alternative to VLOOKUP
Lookup=XLOOKUP(lookup,lookup_array,return_array)=XLOOKUP(“ID103”,A2:A100,D2:D100)(match)Modern lookup (best practice)
Text=TRIM(text)=TRIM(” Hello World “)Hello WorldRemove extra spaces
Text=CLEAN(text)=CLEAN(A2)(cleaned)Remove non-printing chars
Text=LEN(text)=LEN(“Analytics”)9Character count
Text=LEFT(text,n) / =RIGHT(text,n)=LEFT(“Analytics”,4) / =RIGHT(“Analytics”,3)Anal / icsFirst / last N chars
Text=MID(text,start,n)=MID(“Analytics”,3,4)alytN chars from middle
Text=SEARCH(find,within) / =FIND(find,within)=SEARCH(“lyt”,”Analytics”)4Position (SEARCH not case-sens., FIND is)
Text=SUBSTITUTE(text,old,new,[instance])=SUBSTITUTE(“a,b,c”,”,”,”|”)a|b|cReplace text
Text=VALUE(text)=VALUE(“0042”)42Text → number
Text=TEXT(value,”format”)=TEXT(DATE(2025,8,22),”dd-mmm-yyyy”)22-Aug-2025Display with format
Text=PROPER/UPPER/LOWER(text)=PROPER(“data analyst”)Data AnalystChange case
Text=CONCAT(a,b,…) / =TEXTJOIN(delim,ignore,range)=TEXTJOIN(“, “,TRUE,A2:A5)a, b, c, dJoin text values
Text=REPT(text,n)=REPT(“*”,5)*****Repeat text
Date/Time=TODAY() / =NOW()=TODAY()(today)Current date / date+time
Date/Time=DATE(y,m,d) / =TIME(h,m,s)=DATE(2025,8,22)22-Aug-2025Build dates/times
Date/Time=EDATE(start,months)=EDATE(“22-Aug-2025”,1)22-Sep-2025Shift by months
Date/Time=EOMONTH(start,months)=EOMONTH(“15-Aug-2025”,0)31-Aug-2025End of month
Date/Time=DATEDIF(start,end,”y”/”m”/”d”)=DATEDIF(“01-Jan-2020″,”01-Jan-2025″,”y”)5Years/months/days difference
Date/Time=NETWORKDAYS(start,end,[holidays])=NETWORKDAYS(“01-Aug-2025″,”31-Aug-2025”)(workdays)Workdays between dates
Date/Time=WORKDAY(start,days,[holidays])=WORKDAY(“20-Aug-2025”,5)27-Aug-2025Date after N workdays
Date/Time=YEAR(date) / =MONTH(date) / =DAY(date)=YEAR(“22-Aug-2025”)2025Extract parts
Date/Time=WEEKDAY(date,[type])=WEEKDAY(“22-Aug-2025”)6Day of week number
Dynamic=UNIQUE(range)=UNIQUE(A2:A20)(distinct list)Unique values (spills)
Dynamic=SORT(range,[by_col],[order])=SORT(A2:C20,1,TRUE)(sorted spill)Dynamic sort
Dynamic=SORTBY(range,by_array,[order])=SORTBY(A2:C20,C2:C20,-1)(sorted by col C desc)Sort by another array
Dynamic=FILTER(range,include)=FILTER(A2:C20,B2:B20=”East”)(filtered rows)Filter rows by condition
Dynamic=SEQUENCE(rows,[cols],[start],[step])=SEQUENCE(5,1,1,1)1..5Generate sequences
Dynamic=TAKE(range,rows) / =DROP(range,rows)=TAKE(A2:C100,10)(top 10 rows)Trim tables
Dynamic=LET(name,value,calc)=LET(x,SUM(A2:A10), x/COUNT(A2:A10))(average)Name sub-calcs in formula
Financial=PMT(rate,nper,pv)=PMT(10%/12,24,-50000)-2307.38EMI/loan payment
Financial=NPV(rate, v1, v2,…)=NPV(12%,-100000,30000,40000,50000)(value)Net present value
Financial=FV(rate,nper,pmt,[pv])=FV(8%/12,36,-5000,0)(value)Future value
Extra=RAND() / =RANDBETWEEN(a,b)=RANDBETWEEN(1,100)(random int)Create sample data
Extra=ABS(number)=ABS(-12.5)12.5Absolute value
Extra=MOD(number,divisor)=MOD(17,5)2Remainder (useful for cycles)
Extra=CHAR(code) / =CODE(text)=CHAR(10)(line break)Character ↔ code

Share on :

Social Share

Recent Post

© 2024 All rights reserved by Go1digital.com