Tag: Financial Analysis in Excel

  • Top 25 Excel Formulas Every Accountant Should Know (With Clear Examples)

    In today’s business world, accountants rely heavily on Microsoft Excel to manage financial data, prepare reports, and analyze numbers quickly. While anyone can enter data into Excel, mastering the right formulas is what makes an accountant truly efficient and accurate. From simple calculations like SUM and AVERAGE to advanced ones like VLOOKUP, IF, and INDEX-MATCH, these formulas save time, reduce errors, and improve decision-making.

    In this guide, we’ll explore the Top 25 Excel formulas every accountant must know, along with practical examples to help you apply them in real-life accounting tasks.

    Below, I use a simple sample table called Transactions (Excel Table) with columns:
    Date | Voucher | Account | Customer | Amount | Tax | Status | Salesperson

    Tip: Turn your data into a Table with Ctrl + T and use structured references (e.g., Transactions[Amount]).


    1) SUM

    What it does: Adds numbers.

    =SUM(Transactions[Amount])
    

    Quickly totals all amounts.


    2) SUMIFS

    What it does: Sum with multiple conditions (e.g., date range + account).

    =SUMIFS(Transactions[Amount], Transactions[Account], "Sales", Transactions[Date], ">="&DATE(2025,4,1), Transactions[Date], "<="&DATE(2025,6,30))
    

    Use case: Q1 sales only; or sum by customer & status.


    3) COUNTIFS

    What it does: Counts rows meeting multiple criteria.

    =COUNTIFS(Transactions[Status], "Paid", Transactions[Account], "Sales")
    

    How many paid sales invoices?


    4) AVERAGEIFS

    What it does: Average with multiple criteria.

    =AVERAGEIFS(Transactions[Amount], Transactions[Account], "Sales", Transactions[Status], "Paid")
    

    Average paid invoice value.


    5) IF

    What it does: Logical test → value if true/false.

    =IF([@Status]="Overdue","Follow-up","OK")
    

    Flags overdue invoices.


    6) IFS

    What it does: Chain multiple conditions neatly.

    =IFS([@Amount]>=100000,"High",[@Amount]>=25000,"Medium",TRUE,"Low")
    

    7) IFERROR

    What it does: Handles errors gracefully.

    =IFERROR([@[Amount]]/[@[Tax]],0)
    

    Avoids #DIV/0! when tax is zero.


    8) XLOOKUP

    What it does: Modern, flexible lookup (left/right, exact by default).

    =XLOOKUP("CUST-007", Customers[CustID], Customers[GSTIN], "Not found")
    

    Also return multiple columns by selecting a multi-column return array.


    9) VLOOKUP (Legacy but common)

    What it does: Vertical lookup (be careful with column index).

    =VLOOKUP("CUST-007", Customers!A:H, 5, FALSE)
    

    Prefer XLOOKUP where available.


    10) INDEX + MATCH

    What it does: Powerful two-step lookup (works leftward; great for 2D lookups).

    =INDEX(Rates[Rate], MATCH([@Account], Rates[Account], 0))
    

    Two-way example (row & column):

    =INDEX(PivotArea, MATCH("Sales", RowLabels, 0), MATCH("Apr-2025", ColLabels, 0))
    

    11) SUMPRODUCT

    What it does: Conditional math without helper columns; weighted averages.

    =SUMPRODUCT((Transactions[Account]="Sales")*(Transactions[Status]="Paid")*Transactions[Amount])
    

    Weighted average tax rate:

    =SUMPRODUCT(Transactions[Amount], Transactions[Tax]) / SUM(Transactions[Amount])
    

    12) ROUND, ROUNDUP, ROUNDDOWN

    What they do: Control rounding for reports, invoices, GST.

    =ROUND([@Amount]*1.18, 0)      // nearest rupee
    =ROUNDUP([@Amount]*1.18, 0)    // always up
    =ROUNDDOWN([@Amount]*1.18, 0)  // always down
    

    13) ABS

    What it does: Absolute value—useful for variance and adjustments.

    =ABS([@Amount]-[@Budget])
    

    14) EOMONTH & EDATE

    What they do: Month math—closing, aging buckets.

    =EOMONTH([@Date], 0)            // month-end of transaction month
    =EDATE([@Date], 3)              // +3 months
    

    15) DATE, YEAR, MONTH, DAY

    What they do: Build and dissect dates (reporting, grouping).

    =DATE(2025,4,1)
    =YEAR([@Date])    // 2025
    =MONTH([@Date])   // 4
    =DAY([@Date])     // 1
    

    16) DATEDIF

    What it does: Precise gaps (undocumented but reliable).

    =DATEDIF([@JoiningDate], TODAY(), "Y")   // years of service
    

    Other units: "M", "D", "YM" (months ignoring years), "MD".


    17) NETWORKDAYS / NETWORKDAYS.INTL

    What they do: Business days between dates (exclude weekends/holidays).

    =NETWORKDAYS([@InvoiceDate], [@DueDate], HolidayList[Date])
    

    NETWORKDAYS.INTL lets you define weekend pattern (e.g., Friday–Saturday).


    18) WORKDAY / WORKDAY.INTL

    What they do: Add business days to a date (promised date / SLAs).

    =WORKDAY([@InvoiceDate], 7, HolidayList[Date])   // due date after 7 workdays
    

    19) TEXT

    What it does: Format numbers/dates to text (report labels, exports).

    =TEXT([@Date], "dd-mmm-yyyy")
    =TEXT([@Amount], "₹#,##0.00")
    

    20) TEXTJOIN / CONCAT

    What they do: Build strings (invoice titles, addresses).

    =TEXTJOIN(", ", TRUE, [@Customer], [@City], [@State])
    

    Skips blanks with the TRUE argument.


    21) FILTER (Dynamic arrays)

    What it does: Extract rows matching criteria—live query!

    =FILTER(Transactions, (Transactions[Account]="Sales")*(Transactions[Status]="Paid"))
    

    Great for creating dynamic sub-ledgers.


    22) UNIQUE

    What it does: Distinct lists (customers, accounts) for validation and pivots.

    =UNIQUE(Transactions[Customer])
    

    23) SUBTOTAL

    What it does: Aware of filters; ignores hidden rows (choose function code 9/109 for SUM).

    =SUBTOTAL(109, Transactions[Amount])   // SUM visible only
    

    24) NPV, IRR, PMT (Finance Trio)

    What they do: Core finance math for accountants.

    • NPV – Net Present Value:
    =NPV(10%, C2:C7) + C1
    

    (10% discount rate; C1 is initial outflow if entered as a positive value—add it separately.)

    • IRR – Internal Rate of Return:
    =IRR(C1:C7)
    
    • PMT – Loan EMI:
    =PMT(10%/12, 60, -500000)
    

    (10% annual, 60 months, ₹5,00,000 principal.)

    For irregular timings, use XNPV/XIRR.


    25) SORT

    What it does: Sort ranges dynamically (often used with FILTER/UNIQUE).

    =SORT(FILTER(Transactions, Transactions[Status]="Unpaid"), 1, 1)
    

    Sorts by first column ascending.


    Practical Mini-Scenarios

    A) Aging Bucket (30/60/90+)

    =IFS([@DaysDue]<=30,"0–30",[@DaysDue]<=60,"31–60",[@DaysDue]<=90,"61–90",TRUE,"90+")
    

    B) Month-End Provisioning

    =IF(EOMONTH([@Date],0)=TODAY(),"Provision","")
    

    C) Sales by Rep (Dynamic report)

    =LET(
     data, Transactions,
     sales, FILTER(data, data[Account]="Sales"),
     SUMIFS(sales[Amount], sales[Salesperson], H2)
    )
    

    (Using LET to make it readable; optional but powerful.)


    Common Pitfalls & Pro Tips

    • Dates: Use DATE(yyyy,mm,dd) inside criteria (avoid text dates).
    • SUMIFS text criteria: Use operators with & → ">="&DATE(2025,4,1).
    • Rounding: Always round before tax filings/exports to prevent paise mismatches.
    • Dynamic Arrays: If results “spill,” ensure cells below/right are empty.
    • Lookups: Prefer XLOOKUP with a clear not-found message: =XLOOKUP(A2, Map[Code], Map[Name], "No match")

    Quick Reference (What to use when)

    • Conditional totals/counts: SUMIFS, COUNTIFS, SUMPRODUCT
    • Lookups: XLOOKUP (or INDEX+MATCH)
    • Dates & working days: EOMONTH, EDATE, NETWORKDAYS, WORKDAY
    • Cleanup/formatting: TEXT, TEXTJOIN, rounding functions
    • Dynamic reporting: FILTER, UNIQUE, SORT, SUBTOTAL
    • Finance: NPV, IRR, PMT

  • What is the STOCKHISTORY Function?


    The STOCKHISTORY function in Excel 365 allows you to pull historical stock prices (or other financial instruments) directly from Excel’s data service — without needing external plugins or manual downloads.

    📌 Available only in:

    • Microsoft Excel 365 (and Excel for the web)
    • Not available in Excel 2019 or earlier versions

    🔧 Syntax of STOCKHISTORY

    STOCKHISTORY(stock, start_date, [end_date], [interval], [headers], [property1], [property2], ...)
    

    📘 Arguments Explained:

    ArgumentDescription
    stockStock ticker symbol or company name. For example: "TCS.NS", "AAPL"
    start_dateThe date to start pulling data from (required).
    end_dateOptional. If omitted, only data from start_date is returned.
    intervalOptional. Frequency of data: 0 (daily), 1 (weekly), 2 (monthly). Default is daily.
    headersOptional. 0 = no header, 1 = headers shown (default), 2 = headers and instrument info.
    property1, property2,...Optional. Choose what data you want (default is Date and Close price). Options include: 0=Date, 1=Close, 2=Open, 3=High, 4=Low, 5=Volume

    ✅ Example Usage

    1. Daily Stock Prices for TCS for 1 Month:

    =STOCKHISTORY("TCS.NS", "2024-05-01", "2024-05-31")
    

    Returns:

    DateClose
    01-May-243425.5
    02-May-243450.0
    ……

    2. Monthly Closing Price for Apple (AAPL):

    =STOCKHISTORY("AAPL", "2024-01-01", "2024-06-01", 2)
    

    Here, 2 means monthly interval.


    3. Custom Properties (Open, High, Low, Close, Volume):

    =STOCKHISTORY("RELIANCE.NS", "2024-06-01", "2024-06-10", 0, 1, 2, 3, 4, 1, 5)
    

    This returns:

    • Date
    • Open
    • High
    • Low
    • Close
    • Volume

    🛑 Notes and Limitations:

    • Requires Internet access.
    • May not work for all international tickers (like small-cap or regional stock exchanges).
    • Ticker symbols for Indian stocks typically end with .NS (for NSE) or .BO (for BSE), e.g., INFY.NS, RELIANCE.BO.
    • Excel might return an error if the ticker or date range is invalid.
    • Weekend and holiday data won’t be shown.

    🧠 Use Cases:

    • Create a dynamic stock price tracker.
    • Build an automated portfolio dashboard.
    • Perform technical analysis on historical prices.
    • Use with charts for visualizing trends.

    🎓 Want to Learn More About Smart Excel Features?

    If you’re interested in mastering powerful Excel tools like STOCKHISTORY, dynamic charts, PivotTables, functions, and automation, check out this highly practical course:

    🔗 Mastering MS Excel – A Comprehensive Training Course

    ✅ Learn:

    • Advanced Excel functions
    • Real-world automation & dashboards
    • Data analysis tools
    • Bonus: Introduction to VBA & macros

    🎯 Click here to enroll now!


    Top 10 STOCKHISTORY Function Questions and Answers for Excel 365


    ✅ 1. What is the primary use of the STOCKHISTORY function in Excel 365?

    A. Import current stock prices
    B. Retrieve historical stock data
    C. Display live news feed
    D. Generate financial reports automatically

    ✅ Correct Answer: B


    ✅ 2. Which version of Excel supports the STOCKHISTORY function?

    A. Excel 2016
    B. Excel 2019
    C. Excel 365
    D. Excel 2010

    ✅ Correct Answer: C


    ✅ 3. What is the default interval used by STOCKHISTORY if not specified?

    A. Weekly
    B. Monthly
    C. Yearly
    D. Daily

    ✅ Correct Answer: D


    ✅ 4. What does this formula return?

    =STOCKHISTORY("INFY.NS", "2024-05-01", "2024-05-10")

    A. Current price of INFY
    B. Historical closing prices between May 1 and May 10
    C. All financial data of INFY
    D. Only stock volumes for INFY

    ✅ Correct Answer: B


    ✅ 5. Which property number is used to retrieve the “Volume” data in STOCKHISTORY?

    A. 0
    B. 1
    C. 3
    D. 5

    ✅ Correct Answer: D


    ✅ 6. In the formula below, what does the last “2” represent?

    =STOCKHISTORY("AAPL", "2023-01-01", "2023-12-01", 2)

    A. Volume
    B. Monthly interval
    C. Header type
    D. Data column index

    ✅ Correct Answer: B


    ✅ 7. Which of the following is NOT a valid argument for the STOCKHISTORY function?

    A. Stock ticker
    B. Start date
    C. Currency symbol
    D. Property list

    ✅ Correct Answer: C


    ✅ 8. What happens if you try to use STOCKHISTORY in Excel 2019?

    A. It works partially
    B. It shows the latest stock price
    C. It returns an error
    D. It pulls data only for NSE stocks

    ✅ Correct Answer: C


    ✅ 9. What does the header argument “2” do in the STOCKHISTORY function?

    A. Omits column headers
    B. Displays only date and close price
    C. Adds instrument info and column headers
    D. Displays ticker symbol in formula bar

    ✅ Correct Answer: C


    ✅ 10. Which of the following tickers is valid for retrieving Indian stock data via STOCKHISTORY?

    A. “RELIANCE”
    B. “TCS.IN”
    C. “TCS.NS”
    D. “BOM.TCS”

    ✅ Correct Answer: C



    On sale products