0% found this document useful (0 votes)
55 views10 pages

Excel Data Manipulation CheatSheet 1731972102

This cheat sheet provides a comprehensive collection of Excel formulas and functions categorized into various sections such as Text Functions, Date Functions, Lookup Functions, and more. Each section includes specific formulas for tasks like data manipulation, statistical analysis, and error handling. It serves as a quick reference guide for users looking to enhance their Excel skills and perform complex data operations efficiently.

Uploaded by

vamsitarak55
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views10 pages

Excel Data Manipulation CheatSheet 1731972102

This cheat sheet provides a comprehensive collection of Excel formulas and functions categorized into various sections such as Text Functions, Date Functions, Lookup Functions, and more. Each section includes specific formulas for tasks like data manipulation, statistical analysis, and error handling. It serves as a quick reference guide for users looking to enhance their Excel skills and perform complex data operations efficiently.

Uploaded by

vamsitarak55
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

# [ Excel Data Manipulation ] CheatSheet

1. Text Functions

● Extract first word: =LEFT(A1,FIND(" ",A1&" ")-1)


● Extract last word: =RIGHT(A1,LEN(A1)-FIND("~",SUBSTITUTE(A1,"
","~",LEN(A1)-LEN(SUBSTITUTE(A1," ","")))))
● Extract nth word: =TRIM(MID(SUBSTITUTE(A1," ",REPT("
",100)),((N-1)*100)+1,100))
● Get text between delimiters:
=MID(A1,FIND("[",A1)+1,FIND("]",A1)-FIND("[",A1)-1)
● Remove special characters:
=SUBSTITUTE(SUBSTITUTE(A1,CHAR(10),""),CHAR(13),"")
● Clean text: =TRIM(CLEAN(A1))
● Convert to proper case: =PROPER(A1)
● Extract numbers from text: =VALUE(REGEXREPLACE(A1,"[^0-9]",""))
● Extract text from numbers: =REGEXREPLACE(A1,"[0-9]","")
● Concatenate with delimiter: =TEXTJOIN(", ",TRUE,A1:A10)

2. Date Functions

● Extract year: =YEAR(A1)


● Extract month: =MONTH(A1)
● Extract day: =DAY(A1)
● Extract week number: =WEEKNUM(A1)
● Extract quarter: =ROUNDUP(MONTH(A1)/3,0)
● Days between dates: =DATEDIF(A1,B1,"D")
● Months between dates: =DATEDIF(A1,B1,"M")
● Years between dates: =DATEDIF(A1,B1,"Y")
● First day of month: =EOMONTH(A1,-1)+1
● Last day of month: =EOMONTH(A1,0)

3. Lookup Functions

● Vlookup exact match:


=VLOOKUP(lookup_value,table_array,col_index,FALSE)
● Vlookup approximate match:
=VLOOKUP(lookup_value,table_array,col_index,TRUE)
● Hlookup: =HLOOKUP(lookup_value,table_array,row_index,FALSE)
● Index-Match: =INDEX(return_array,MATCH(lookup_value,lookup_array,0))

By: Waleed Mousa


● Index-Match-Match:
=INDEX(return_array,MATCH(row_lookup,row_array,0),MATCH(col_lookup,
col_array,0))
● Multiple criteria lookup:
=INDEX(return_array,MATCH(1,(criteria1=array1)*(criteria2=array2),0
))
● Xlookup:
=XLOOKUP(lookup_value,lookup_array,return_array,if_not_found)
● Xmatch: =XMATCH(lookup_value,lookup_array,match_mode,search_mode)
● Lookup with wildcard:
=VLOOKUP("*"&A1&"*",table_array,col_index,FALSE)
● Case-insensitive lookup:
=VLOOKUP(LOWER(A1),LOWER(table_array),col_index,FALSE)

4. Conditional Functions

● Nested IF: =IF(A1>90,"A",IF(A1>80,"B",IF(A1>70,"C","F")))


● IFS function: =IFS(A1>90,"A",A1>80,"B",A1>70,"C",TRUE,"F")
● SWITCH function: =SWITCH(A1,1,"One",2,"Two",3,"Three","Other")
● Conditional SUM: =SUMIF(range,criteria,sum_range)
● Conditional COUNT: =COUNTIF(range,criteria)
● Multiple criteria SUM:
=SUMIFS(sum_range,criteria_range1,criteria1,criteria_range2,criteri
a2)
● Multiple criteria COUNT:
=COUNTIFS(criteria_range1,criteria1,criteria_range2,criteria2)
● Conditional AVERAGE: =AVERAGEIF(range,criteria,average_range)
● Multiple criteria AVERAGE:
=AVERAGEIFS(average_range,criteria_range1,criteria1,criteria_range2
,criteria2)
● Logical AND: =IF(AND(condition1,condition2),"Yes","No")

5. Array Functions

● Array SUM: =SUM(IF(condition,value_if_true))


● Array COUNT: =COUNT(IF(condition,value_if_true))
● Array AVERAGE: =AVERAGE(IF(condition,value_if_true))
● Array MAX: =MAX(IF(condition,value_if_true))
● Array MIN: =MIN(IF(condition,value_if_true))
● Array multiplication: =SUMPRODUCT(array1,array2)
● Array division: =SUMPRODUCT(array1,1/array2)

By: Waleed Mousa


● Array concatenation:
=TEXTJOIN(",",TRUE,IF(condition,value_if_true,""))
● Dynamic range array: =INDEX(array,SEQUENCE(ROWS(array)))
● Filter array: =FILTER(array,condition)

6. Statistical Functions

● Calculate mode: =MODE.SNGL(range)


● Calculate median: =MEDIAN(range)
● Calculate variance: =VAR.P(range)
● Calculate standard deviation: =STDEV.P(range)
● Calculate correlation: =CORREL(array1,array2)
● Calculate percentile: =PERCENTILE.INC(array,k)
● Calculate rank: =RANK.EQ(number,ref,order)
● Calculate frequency: =FREQUENCY(data_array,bins_array)
● Calculate quartile: =QUARTILE.INC(array,quart)
● Calculate z-score: =(value-AVERAGE(range))/STDEV.P(range)

7. Text Manipulation

● Extract left n characters: =LEFT(text,n)


● Extract right n characters: =RIGHT(text,n)
● Extract middle characters: =MID(text,start_num,num_chars)
● Find position of text: =FIND(find_text,within_text)
● Case-insensitive find: =SEARCH(find_text,within_text)
● Replace text: =SUBSTITUTE(text,old_text,new_text,instance_num)
● Repeat text: =REPT(text,number_times)
● Remove spaces: =TRIM(text)
● Count words: =LEN(TRIM(A1))-LEN(SUBSTITUTE(A1," ",""))+1
● Split text: =FILTERXML("<t><s>"&SUBSTITUTE(A1,"
","</s><s>")&"</s></t>","//s")

8. Data Cleaning

● Remove duplicates formula:


=IF(COUNTIF($A$1:A1,A1)>1,"Duplicate","Unique")
● Remove leading zeros: =VALUE(text)
● Remove trailing zeros: =TEXT(number,"#.####")
● Fix date format: =DATE(YEAR(A1),MONTH(A1),DAY(A1))
● Convert to number: =--text
● Remove non-printable characters: =CLEAN(text)
By: Waleed Mousa
● Remove specific character: =SUBSTITUTE(text,char,"")
● Standardize case: =UPPER(text) or =LOWER(text)
● Remove line breaks:
=SUBSTITUTE(SUBSTITUTE(A1,CHAR(10),""),CHAR(13),"")
● Validate email format:
=IF(ISNUMBER(SEARCH("@",A1))*(ISNUMBER(SEARCH(".",A1))),"Valid","In
valid")

9. Pivot Table Formulas

● Calculated field: =SUM(Sales)/SUM(Units)


● Running total in pivot:
=GETPIVOTDATA("Sales",PivotTable,RunningTotal)
● Percent of total: =Current/TOTAL
● Difference from previous: =Current-PREVIOUS
● Year-over-year growth: =(Current-PREVIOUS)/PREVIOUS
● Moving average: =AVERAGE(OFFSET(Current,-N+1,0,N,1))
● Rank within category: =RANK(Current,CategoryRange)
● Cumulative total: =SUM($A$1:A1)
● Percent of parent: =Current/Parent
● Growth rate: =(Current/First)-1

10. Power Query Formulas (M Language)

● Remove columns: Table.RemoveColumns(Source, {"Column1", "Column2"})


● Filter rows: Table.SelectRows(Source, each [Column] > 100)
● Group by: Table.Group(Source, {"GroupColumn"}, {{"Sum", each
List.Sum([Value]), type number}})
● Pivot: Table.Pivot(Source, List.Distinct([PivotColumn]),
"PivotColumn", "ValueColumn")
● Unpivot: Table.UnpivotOtherColumns(Source, {"KeepColumn"},
"Attribute", "Value")
● Merge queries: Table.NestedJoin(Table1, "Key", Table2, "Key",
"NewColumn", JoinKind.Inner)
● Split column: Table.SplitColumn(Source, "Column",
Splitter.SplitTextByDelimiter(","))
● Replace values: Table.ReplaceValue(Source, "Old", "New",
Replacer.ReplaceText)
● Add custom column: Table.AddColumn(Source, "NewColumn", each
[Column1] + [Column2])
● Sort table: Table.Sort(Source, {{"Column", Order.Ascending}})
By: Waleed Mousa
11. Error Handling

● Handle division by zero: =IFERROR(A1/B1,0)


● Check for error: =IF(ISERROR(A1),"Error","Valid")
● Handle N/A: =IFNA(VLOOKUP(...),"Not Found")
● Multiple error types: =IF(ISERR(A1),"Error",IF(ISNA(A1),"N/A",A1))
● Custom error message: =IFERROR(formula,"Custom Message")
● Check for specific error: =IF(ISREF(A1),"Valid Reference","Invalid
Reference")
● Handle circular reference: =IF(ISERROR(A1),0,A1)
● Validate numeric input: =IF(ISNUMBER(A1),A1,"Invalid Number")
● Check for blank: =IF(ISBLANK(A1),"Empty","Not Empty")
● Error location: =ADDRESS(ROW(),COLUMN())

12. Advanced Data Analysis

● Moving correlation:
=CORREL(OFFSET($A$1,ROW()-1,0,N,1),OFFSET($B$1,ROW()-1,0,N,1))
● Exponential smoothing: =α*Current+(1-α)*Previous
● Linear regression:
=SLOPE(y_range,x_range)*x+INTERCEPT(y_range,x_range)
● Compound annual growth rate: =(Last/First)^(1/Years)-1
● Rolling standard deviation: =STDEV.P(OFFSET($A$1,ROW()-1,0,N,1))
● Anomaly detection:
=IF(ABS(Current-AVERAGE(Range))>2*STDEV.P(Range),"Anomaly","Normal"
)
● Pareto analysis: =SUMPRODUCT(--(Range>=Current))/SUM(Range)
● ABC classification:
=IF(CumulativePercent<=0.8,"A",IF(CumulativePercent<=0.95,"B","C"))
● Time series decomposition: =Current/AVERAGE(OFFSET(Current,-11,0,12))
● Forecast: =FORECAST.LINEAR(x,known_y,known_x)

13. Data Validation

● Range validation: =AND(A1>=Min,A1<=Max)


● List validation: =COUNTIF(ValidList,A1)>0
● Date validation: =AND(A1>=StartDate,A1<=EndDate)
● Pattern validation: =LEN(A1)=LEN(SUBSTITUTE(A1,"*",""))
● Unique value validation: =COUNTIF($A$1:$A$100,A1)=1
● Dependencies validation: =IF(A1="Yes",B1<>"")
● Format validation: =AND(LEN(A1)=10,ISNUMBER(--SUBSTITUTE(A1,"-","")))
By: Waleed Mousa
● Conditional validation:
=OR(AND(A1="Type1",B1>0),AND(A1="Type2",B1<0))
● Cross-reference validation: =COUNTIF(OtherRange,A1)>0
● Complex validation: =AND(validation1,validation2,validation3)

14. Business Intelligence Functions

● Customer lifetime value:


=AVERAGE(Revenue)*RetentionRate/(1-RetentionRate)
● Market share: =Sales/TotalMarketSales
● Customer churn rate: =LostCustomers/TotalCustomers
● Revenue per employee: =TotalRevenue/EmployeeCount
● Inventory turnover: =COGS/AverageInventory
● Accounts receivable turnover:
=NetCreditSales/AverageAccountsReceivable
● Debt to equity ratio: =TotalLiabilities/TotalEquity
● Gross profit margin: =(Revenue-COGS)/Revenue
● Operating leverage: =(Revenue-VariableCosts)/(Revenue-TotalCosts)
● Return on investment: =NetProfit/Investment

15. Advanced Lookup and Reference

● Multi-condition lookup:
=INDEX(Return,MATCH(1,(Condition1)*(Condition2),0))
● Dynamic named range: =OFFSET(StartCell,0,0,COUNTA(Column),1)
● Indirect reference: =INDIRECT("Sheet1!A"&ROW())
● Column letter to number: =COLUMN(INDIRECT(ColumnLetter&"1"))
● Find last row: =MATCH(2,1/(NOT(ISBLANK(Range))),1)
● Find last column: =MATCH(2,1/(NOT(ISBLANK(Row))),1)
● Dynamic range reference: =ADDRESS(ROW(),COLUMN())
● Cross-worksheet reference:
=INDIRECT("'"&SheetName&"'!"&CellReference)
● Array lookup: =INDEX(Return,SMALL(IF(Condition,ROW(Condition)),N))
● Reverse lookup: =INDEX(Return,MATCH(Value,Index,0))

16. Advanced Text Manipulation

● Extract domain from email: =MID(A1,FIND("@",A1)+1,LEN(A1))


● Extract phone number format:
=TEXT(--REGEXREPLACE(A1,"[^0-9]",""),"(###) ###-####")
● Convert number to words: =NUMBERVALUE(Text)

By: Waleed Mousa


● Parse name components: =FILTERXML("<t><s>"&SUBSTITUTE(A1,"
","</s><s>")&"</s></t>","//s[1]")
● Remove multiple spaces: =REGEXREPLACE(A1,"\s+"," ")
● Extract URL components:
=MID(A1,FIND("://",A1)+3,FIND("/",A1,9)-FIND("://",A1)-3)
● Format currency: =TEXT(A1,"$#,##0.00")
● Parse CSV string: =TRIM(MID(SUBSTITUTE(A1,",",REPT("
",999)),N*999-998,999))
● Convert case conditionally:
=IF(LEFT(A1)=UPPER(LEFT(A1)),PROPER(A1),A1)
● Format social security number: =TEXT(--LEFT(A1,9),"000-00-0000")

17. Advanced Date and Time

● Working days between dates: =NETWORKDAYS(StartDate,EndDate)


● Add working days: =WORKDAY(StartDate,NumberOfDays)
● Next working day: =WORKDAY(Date,1)
● Previous working day: =WORKDAY(Date,-1)
● Fiscal year start: =DATE(YEAR(Date),FiscalStartMonth,1)
● Fiscal quarter: =ROUNDUP((MONTH(Date)-FiscalStartMonth+13)/3,0)
● Age calculation: =DATEDIF(Birthdate,TODAY(),"Y")
● Days remaining in month: =DAY(EOMONTH(Date,0))-DAY(Date)
● Week ending date: =Date-WEEKDAY(Date,2)+5
● ISO week number: =ISOWEEKNUM(Date)

18. Performance Optimization

● Array constant: =SUM(N(IF(Condition,Value)))


● Replace VLOOKUP with INDEX-MATCH: =INDEX(Return,MATCH(Lookup,Range,0))
● Use helper columns: =IF(HelperColumn=Criteria,Calculation)
● Minimize volatile functions: =ROW() instead of =NOW()
● Array optimization: {=SUM(IF(Condition,Value))}
● Reduce calculation chain: =IF(Trigger,ComplexFormula,PreviousValue)
● Use tables for structured references: =TableName[ColumnName]
● Efficient range references: =A:A vs =A1:A1000
● Minimize array size: =MATCH(2,1/(Condition)) instead of
=MATCH(TRUE,Condition,0)
● Use structured table references: =[@ColumnName]

By: Waleed Mousa


19. Data Mining Techniques

● Binning data: =FLOOR(Value,BinSize)


● Frequency distribution: =FREQUENCY(DataRange,BinsRange)
● Outlier detection: =IF(ABS((Value-Mean)/StdDev)>3,"Outlier","Normal")
● Pattern recognition: =IF(REGEXMATCH(Text,Pattern),"Match","No Match")
● Association rules:
=IF(Support>=MinSupport*AND(Confidence>=MinConfidence),"Valid","Inv
alid")
● Decision tree node:
=IF(Feature1<=Threshold1,Class1,IF(Feature2<=Threshold2,Class2,Clas
s3))
● K-means distance: =SQRT(SUMXMY2(Point1,Point2))
● Similarity score:
=SUMPRODUCT(Vector1,Vector2)/SQRT(SUMPRODUCT(Vector1,Vector1)*SUMPR
ODUCT(Vector2,Vector2))
● Feature scaling: =(Value-Min)/(Max-Min)
● Data discretization:
=CHOOSE(MATCH(Value,Thresholds,1),"Low","Medium","High")

20. Advanced Statistical Analysis

● Multiple regression: =LINEST(y_range,x_range,TRUE,TRUE)


● Chi-square test: =CHISQ.TEST(ObservedRange,ExpectedRange)
● T-test: =T.TEST(Array1,Array2,2,1)
● F-test: =F.TEST(Array1,Array2)
● ANOVA: =ANOVA(DataRange,Groups)
● Confidence interval: =CONFIDENCE.NORM(alpha,StdDev,n)
● Skewness: =SKEW(Range)
● Kurtosis: =KURT(Range)
● Covariance: =COVARIANCE.P(Array1,Array2)
● Box plot calculations: =QUARTILE.INC(Range,{0,1,2,3,4})

21. Financial Modeling

● Net present value: =NPV(Rate,CashFlows)


● Internal rate of return: =IRR(CashFlows)
● Modified IRR: =MIRR(CashFlows,FinanceRate,ReinvestRate)
● Depreciation: =DB(Cost,Salvage,Life,Period)
● Loan payment: =PMT(Rate,Term,PrincipalAmount)
● Future value: =FV(Rate,Nper,Pmt,Pv)
By: Waleed Mousa
● Present value: =PV(Rate,Nper,Pmt,Fv)
● Effective annual rate: =(1+NominalRate/Frequency)^Frequency-1
● Bond price:
=PRICE(Settlement,Maturity,Rate,Yield,Redemption,Frequency)
● Option pricing: =BLACK_SCHOLES(S,K,T,R,Sigma,"call")

22. Report Automation

● Dynamic report title: ="Report for "&TEXT(TODAY(),"mmmm yyyy")


● Auto-updating timestamp: =TEXT(NOW(),"dd-mmm-yyyy hh:mm:ss")
● Page numbering: ="Page "&PAGE()&" of "&NUMPAGES
● Dynamic chart range: =OFFSET(StartCell,0,0,COUNTA(DataRange),1)
● Conditional formatting formula: =AND($B2>0,$C2<$B2)
● Auto-expanding table: =@TableName
● Dynamic named range: =OFFSET(Sheet1!$A$1,0,0,COUNTA(Sheet1!$A:$A),1)
● Auto-refresh trigger:
=IF(NOW()>LastRefresh+TimeInterval,REFRESH(),"")
● Dynamic report filter: =FILTER(Range,Criteria)
● Automated summary statistics:
=CHOOSE({1,2,3},COUNT(Range),AVERAGE(Range),MAX(Range))

23. Advanced Error Detection

● Data type mismatch:


=IF(ISNUMBER(--A1)=ISNUMBER(A1),"Match","Mismatch")
● Range bounds check:
=IF(AND(A1>=MinValue,A1<=MaxValue),"Valid","Invalid")
● Cross-validation check: =IF(Control=Verification,"Valid","Error")
● Consistency check: =IF(A1=B1,"Consistent","Inconsistent")
● Format validation: =IF(REGEXMATCH(A1,Pattern),"Valid Format","Invalid
Format")
● Logic check: =IF(Condition1=Condition2,"Logic Valid","Logic Error")
● Reference integrity: =IF(COUNTIF(MasterList,Value)>0,"Valid","Invalid
Reference")
● Calculation verification:
=IF(ABS(Expected-Actual)<Tolerance,"Valid","Error")
● Duplicate check: =IF(COUNTIF($A$1:$A$1000,A1)>1,"Duplicate","Unique")
● Missing value detection:
=IF(COUNTA(Range)=ROWS(Range)*COLUMNS(Range),"Complete","Missing
Values")

By: Waleed Mousa


24. Advanced Data Transformation

● Pivot data:
=CHOOSE(MATCH(Category,Categories,0),Value1,Value2,Value3)
● Unpivot data: =OFFSET($A$1,ROW(A1)-1,COLUMN(A1)-1)
● Transpose dynamic range: =TRANSPOSE(Range)
● Cross-tabulation: =SUMPRODUCT((Category1=A1)*(Category2=B1)*Values)
● Data reshaping:
=INDEX(DataRange,QUOTIENT(ROW()-1,NumColumns)+1,MOD(ROW()-1,NumColu
mns)+1)
● Array expansion: =SEQUENCE(ROWS(Range)*COLUMNS(Range))
● Matrix multiplication: =MMULT(Matrix1,Matrix2)
● Vector operations: =SUMPRODUCT(Vector1,Vector2)
● Data normalization: =(Value-MIN(Range))/(MAX(Range)-MIN(Range))
● Data standardization: =(Value-AVERAGE(Range))/STDEV.P(Range)

25. Advanced Business Analytics

● Customer segmentation:
=IF(Value>Threshold1,"Premium",IF(Value>Threshold2,"Standard","Basi
c"))
● Profitability analysis: =(Revenue-Cost)/Revenue
● Price elasticity: =(ΔQuantity/Quantity)/(ΔPrice/Price)
● Market basket analysis:
=SUMPRODUCT((Product1=1)*(Product2=1))/COUNT(Transactions)
● Customer lifetime value:
=PresentValue*(1+GrowthRate)/(1+DiscountRate-GrowthRate)
● Churn prediction: =IF(DaysSinceLastPurchase>Threshold,"At
Risk","Active")
● Sales forecasting:
=FORECAST.ETS(FutureDate,HistoricalValues,HistoricalDates)
● Inventory optimization: =SQRT(2*AnnualDemand*OrderCost/HoldingCost)
● Break-even analysis: =FixedCosts/(PricePerUnit-VariableCostPerUnit)
● Performance scorecard: =SUMPRODUCT(Weights,NormalizedMetrics)

By: Waleed Mousa

You might also like