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

Customer Credit (Khata) Book in Excel: Udhaar Balance per Customer with SUMIFS

Raja runs a kirana shop in Solapur. Regular customers take goods on credit and pay later, and the paper khata has crossed-out lines and pages that are hard to add up. In Excel every credit and every payment is one row, and each customer's balance appears on its own, along with who has not paid for a long time.

What you'll learn on this page

  • A ledger with one row per credit or payment
  • A + / − column with IF
  • A running balance per customer with SUMIF and a growing range
  • Credit given and paid back per customer with SUMIFS
  • Days since last payment with MAXIFS
  • A Remind now status above a limit you choose

Download the template: customer-credit-khata-book-template.xlsx: example data with real formulas. Yellow cells are inputs you can type over; green cells hold formulas; blue rows are headers and totals. Replace the example data with your own and everything recalculates.

Made-up data: every name, amount, shop and date on this page is made up for practice. Cities are used only to make the examples feel real.

1. The example

Raja's khata from 1 September to 14 October 2026 (made-up values):

Customer Credit given Paid back Balance Days since last payment Status
Shahrukh ₹2,180 ₹1,200 ₹980 37 Pending
Zoya ₹2,380 ₹1,000 ₹1,380 22 Pending
Salman ₹5,400 ₹1,500 ₹3,900 12 Remind now
Ravina ₹1,360 ₹0 ₹1,360 No payment yet Pending
Total ₹11,320 ₹3,700 ₹7,620

₹7,620 is out with customers. Salman's ₹3,900 is above the ₹3,000 reminder limit, and Ravina has not paid anything yet. October alone added ₹3,480 of new credit.

Inputs (yellow) Date and customer Credit or Payment Amount Formulas ± = IF(Credit, +, −) Running = SUMIF($B$7:B7...) SUMIFS, MAXIFS Results ₹7,620 outstanding Salman: Remind now Ravina: no payment yet

Figure 1. Every credit and payment is one ledger row; IF turns payments into minus; SUMIF with a growing range gives a running balance; SUMIFS and MAXIFS summarise each customer.

The customer-credit-khata-book-template.xlsx template sheet with example data, yellow input cells and green formula cells

Figure 2. The template sheet, recalculated with its example data. Download it above and replace the yellow cells with your own numbers.

2. Build it step by step

Step 1. The ledger

  1. In A6:F6 type Date, Customer, Type, Amount, + / −, Customer balance. Each credit or payment is one new row.
  2. Select B7:B200 > Data Validation > List with the customer names, and C7:C200 with Credit,Payment (drop-down lists).

Step 2. Plus or minus

  1. In E7 type =IF(C7="Credit",D7,-D7). Credit adds to what the customer owes; a payment subtracts.

Step 3. Running balance per customer

  1. In F7 type =SUMIF($B$7:B7,B7,$E$7:E7) and copy down.
  2. The range starts fixed at row 7 and grows as you copy, so each row adds only that customer's entries so far. After Salman's 12-10 credit his balance is ₹3,900 (SUMIF, mixed references).

Step 4. Customer summary

  1. In H7:H10 type the customer names.
  2. In I7 type =SUMIFS($D$7:$D$19,$B$7:$B$19,H7,$C$7:$C$19,"Credit") and in J7 the same with "Payment".
  3. In K7 type =I7-J7 for the balance.

Step 5. Days since last payment

  1. MAXIFS(max_range, criteria_range1, criteria1, ...) returns the biggest value that matches; for dates that is the latest one (MAXIFS).
  2. In L7 type =IF(J7=0,"No payment yet",$B$3-MAXIFS($A$7:$A$19,$B$7:$B$19,H7,$C$7:$C$19,"Payment")): 37 days for Shahrukh.

Step 6. Status and colours

  1. In B4 type the reminder limit (₹3,000). In M7 type =IF(K7>=$B$4,"Remind now",IF(K7>0,"Pending","Clear")).
  2. Select M7:M10 > Highlight Cells Rules > Equal To "Remind now" red, "Clear" green. Select A7:F200 > Use a formula =$C7="Payment" green (formula rules).

Ravindra Bagale's Tip

Type entries the same evening. A khata is only trusted if it is updated every day.

3. Formulas used

Cell Formula What it does
E7 =IF(C7="Credit",D7,-D7) + / − amount
F7 =SUMIF($B$7:B7,B7,$E$7:E7) Running customer balance
I7 =SUMIFS($D$7:$D$19,$B$7:$B$19,H7,$C$7:$C$19,"Credit") Credit given
J7 =SUMIFS($D$7:$D$19,$B$7:$B$19,H7,$C$7:$C$19,"Payment") Paid back
K7 =I7-J7 Balance
L7 =IF(J7=0,"No payment yet",$B$3-MAXIFS($A$7:$A$19,$B$7:$B$19,H7,$C$7:$C$19,"Payment")) Days since last payment
M7 =IF(K7>=$B$4,"Remind now",IF(K7>0,"Pending","Clear")) Status
K13 =SUMIFS(D7:D19,C7:C19,"Credit",A7:A19,">="&DATE(2026,10,1)) Credit given in October
K14 =INDEX(H7:H10,MATCH(MAX(K7:K10),K7:K10,0)) Biggest balance

Every formula above is written in the template, so you can click a cell and see it in the formula bar. All values on this page were recalculated in the file.

4. Common mistakes

  1. Typing a payment as a negative amount. Type the amount as a positive number and choose Payment. Column E makes it negative.
  2. Different spellings of a name. "Salman" and "salman " are different to SUMIFS. Use the drop-down so names always match.
  3. Fixing both ends of the running range. $B$7:$B$7 would never grow. Only the start is fixed: $B$7:B7.
  4. Editing old rows to show a payment. Never change an old credit. Add a new Payment row so the history stays honest.
  5. Forgetting new customers in the summary. Add the name to the drop-down list and to the summary table, then copy the formulas down.

Ravindra Bagale's Tip

Sort the summary by Days since last payment once a week and call the top two customers politely.

5. More real examples

Example 1: Lending between friends. Use the same ledger for money lent to friends: Lent and Returned instead of Credit and Payment.

Example 2: A tiffin or milk service. Each day's supply is a Credit, each month's payment a Payment. The balance shows who is behind.

Example 3: A ready-to-send reminder. Add ="Namaste "&H7&", your balance is ₹"&TEXT(K7,"#,##0") to build a reminder message to copy.

Quick revision cards

Quick revision

Each card shows formulas from this page, each with an example and its answer from the template. Scan the QR code on a card to open this lesson. All names and numbers are made up for practice.

Revision card 1 for Customer Credit in Excel: + / − amount: =IF(C7="Credit",D7,-D7) gives ₹1,200; Running customer balance: =SUMIF($B$7:B7,B7,$E$7:E7) gives ₹1,200; Credit given: =SUMIFS($D$7:$D$19,$B$7:$B$19,H7,$C$7:$C$19,"Credit") gives ₹2,180.
Card 1 of 2: Customer Credit in Excel · Download PNG
Revision card 2 for Customer Credit in Excel: Balance: =I7-J7 gives ₹980; Paid back: =SUMIFS($D$7:$D$19,$B$7:$B$19,H7,$C$7:$C$19,"Payment") gives ₹1,200; Status: =IF(K7>=$B$4,"Remind now",IF(K7>0,"Pending","Clear")) gives Pending.
Card 2 of 2: Customer Credit in Excel · Download PNG

More cards: Ravi Sir's Cards.

6. Frequently asked questions

How do I make a khata book in Excel?

Keep one row per credit or payment with date, customer, type and amount, then total each customer with SUMIFS.

How do I show a running balance for each customer?

Use =SUMIF($B$7:B7,B7,$E$7:E7), where column E is + for credit and − for payment.

How do I find the last payment date of a customer?

Use =MAXIFS(date_column, customer_column, name, type_column, "Payment"). MAXIFS is in Excel 2019 and Microsoft 365.

How do I flag customers who owe too much?

Type a limit in a cell and use =IF(balance>=limit,"Remind now",...) with a red highlight.

Can I keep a separate sheet per customer?

One ledger is easier: filters and SUMIFS give any customer's view without copying data.

7. Quick quiz

Ten questions on this page. Sign in to save your score.

Loading practice tasks...

  1. Total units sold (Easy): Add up Units sold in D2:D11.
  2. Average price (Easy): Average of E2:E11, rounded to 2 decimals.
  3. Rows in Snacks (Easy): How many rows have Category "Snacks"?
  4. Largest units sold (Easy): The largest value in D2:D11.
  5. Units sold for Snacks (Medium): Total of D2:D11 where B is "Snacks".
  6. Snacks in Delhi (Medium): Total of D2:D11 where B is "Snacks" and C is "Delhi".
  7. Best in Snacks (Medium): Largest E2:E11 value where B is "Snacks".
  8. Value of row 2 (Medium): D2 times E2.
  9. Look up Arjun Mehta (Medium): The Units sold for "Arjun Mehta" (use a lookup on column A).
  10. Total value (Hard): Sum of D times E for all rows.
  11. Share of Snacks (Hard): Share of D2:D11 that is "Snacks", rounded to 3 decimals.
  12. Rank of row 2 (Hard): Rank of D2 among D2:D11 (largest = 1).
  13. Above average? (Hard): "Above" if E2 is above the average of E2:E11, else "Below".