Home / Blog / How to Find GST in a Spreadsheet
How to Find GST in a Spreadsheet
Find GST in a spreadsheet: extract and validate GSTINs, check state codes and duplicates, then calculate GST amounts from inclusive or exclusive prices.
What you can request
Tell us your target and we prepare a sample.
To find GST in a spreadsheet, you either validate GSTINs in a column or work out the tax inside a price. This guide shows how to find GST in a spreadsheet both ways, with formulas and a worked example.

The phrase can mean two things, and both are common in offices. Some people want to find GST numbers (GSTINs) inside a messy spreadsheet of customers or vendors, and validate them. Others want to find the GST amount inside a price, splitting an inclusive price into base value and tax. This guide covers both with formulas that work in Excel and online spreadsheets, and explains what a GSTIN does and does not tell you.
Part 1: Find and Validate GST Numbers in a Spreadsheet
The structure of a GSTIN
A GSTIN has 15 characters:
- Characters 1-2: state code (for example 27 for Maharashtra, 29 for Karnataka, 33 for Tamil Nadu).
- Characters 3-12: the PAN of the taxpayer.
- Character 13: the registration number for that PAN within the state, a number or letter.
- Character 14: the letter Z by default.
- Character 15: a check character, which is computed from the preceding 14.
Knowing this gives you everything you need to find and validate GSTINs using pattern rules.
Extract GSTINs from free text
If GSTINs are buried in a notes column, for example “Invoice from Sharma Traders GST 07ABCDE1234F1Z5 paid”, you can use a regular expression. In an online spreadsheet:
=REGEXEXTRACT(A2, "[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z]{1}[1-9A-Z]{1}Z[0-9A-Z]{1}")
Newer versions of Excel now has REGEXEXTRACT in recent builds. If you do not have it, use a Power Query step, or split the text by spaces and filter the parts with a length of 15.
Validate the format
Use this formula in an online spreadsheet to mark valid formats:
=REGEXMATCH(A2, "^[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z]{1}[1-9A-Z]{1}Z[0-9A-Z]{1}$")
In older Excel, test length and pieces:
=AND(LEN(A2)=15, ISNUMBER(--LEFT(A2,2)), MID(A2,14,1)="Z")
Format validation catches typos such as a missing character or lowercase letters, but not a number that does not exist.
Check the state code
Create a small lookup table of state codes and names, then use =VLOOKUP(LEFT(A2,2), StateTable, 2, FALSE). This helps to spot rows where the GSTIN state does not match the address state, which is common when a business has multiple registrations.
Extract the PAN
=MID(A2,3,10) gives the PAN. The fourth character of the PAN indicates the entity type: P for individual, C for company, F for firm, H for Hindu undivided family, and so on. You can use this to classify vendors automatically.
Find duplicates
Select the GSTIN column and use conditional formatting with =COUNTIF($A:$A, A2)>1. Duplicates in a vendor master can cause duplicate payments or split credit records.
Verify against the official record
Format checks are not proof that a registration is active. For a small batch, use the public taxpayer search in GST records. For a larger batch, businesses typically use an authorised GST suvidha provider’s bulk verification service or the API offered to registered users. Verification confirms the legal name, status and dates. It does not provide phone numbers, sales figures or invoices.
Part 2: Finding the GST amount in a price
If the price excludes GST
- GST amount:
=B2*C2where B2 is the base price and C2 the rate as a decimal, for example 0.18. - Total:
=B2*(1+C2).
If the price includes GST
Here the tax is hidden inside the total, so you find it by reversing:
- Base value:
=B2/(1+C2). - GST amount:
=B2-B2/(1+C2).
Split into CGST and SGST for intra-state supplies by dividing the GST amount by two. For inter-state supplies, the whole amount is IGST.
Deriving the rate from two numbers
If you have the base and the total, the rate is =(Total-Base)/Base. Format as a percentage and round with =ROUND(..., 2). Use this to audit whether the rate applied on an invoice matches the notified rate for that item.
A worked example
Imagine a hypothetical office furniture dealer in Nagpur with a sheet where column A has free-text vendor notes, column B holds the price paid, and column C contains the rate.
Row 2: “Vendor Om Steel Works GST 27ABCDE1234F1Z5”, price 11,800, rate 18 percent, price includes GST.
- Extract the GSTIN with REGEXEXTRACT. The result is 27ABCDE1234F1Z5.
- The state code 27 maps to Maharashtra, which matches the dealer’s own state, so the supply is intra-state.
- The base value is 11,800 / 1.18 = 10,000.
- The GST is 1,800, split as 900 CGST and 900 SGST.
- The PAN is ABCDE1234F, and the fourth character is D, which is not a standard category letter in this illustration, so the dealer flags it for review. In practice a real PAN would have a valid entity letter such as P, C, F, H, A, B, G, J, L or T.
Notice that the flag is only a prompt to check the source document. The spreadsheet has no way to know whether the vendor is genuine.
Building a reusable vendor-check sheet
Set up these columns once:
- Raw text
- Extracted GSTIN
- Format valid (TRUE or FALSE)
- State code and state name
- PAN
- PAN entity type
- Duplicate flag
- Verified in GST records (yes, no, date)
- Status as seen at verification
- Notes
Protect the formula columns, and keep the verification columns as manual entries with the date of verification.
Common problems
- Leading or trailing spaces: wrap with TRIM.
- Lowercase letters: wrap with UPPER.
- Numbers stored as text or scientific notation in the PAN digits: format the column as text before pasting.
- Letter O and digit 0 confusion, and letter I and digit 1: check with the pattern and compare with the source.
- Importing from PDFs: copying often inserts line breaks, so use CLEAN and SUBSTITUTE.
What a GSTIN does not tell you
A GSTIN identifies a registration. It does not reveal the taxpayer’s phone number, email, turnover, customers, invoices or returns. Those are not in the public record, and return data stays with the taxpayer under the CGST Act. If anyone offers to convert a list of GSTINs into mobile numbers or sales figures, treat it as a red flag. For contacting businesses, use open sources such as company websites, business directories and B2B databases built from public information, and respect the DPDP Act 2023, TRAI DND rules and email opt-outs.
Cleaning a large customer list step by step
Suppose you inherit a spreadsheet of 5,000 customers collected over many years by different salespeople. A practical clean-up routine is:
- Copy the raw sheet to a new tab so the original stays intact.
- Apply TRIM, UPPER and CLEAN to the GSTIN column and save the results as values.
- Flag rows where the length is not 15.
- Flag rows that fail the pattern check.
- Sort by GSTIN and mark duplicates, then decide which record to keep based on the most recent transaction.
- Add the state name from the state code and compare it with the city or state column, flagging differences for manual review.
- Export the rows that passed to a clean tab, and the rows that failed to a review tab with a reason column.
Even this light process typically removes a lot of clutter and makes every later exercise, such as e-invoicing or GSTR-1 preparation, more reliable. It also prevents embarrassing emails and mail-merged invoices that carry a wrong tax number.
Using the check-character algorithm
For a stronger test, the fifteenth character of a GSTIN is computed from the first fourteen using a modulus 36 method. Each character maps to a value (digits 0 to 9, letters A to Z as 10 to 35), alternate positions are weighted by one or two, the products are split into quotient and remainder in base 36, and the sum is used to derive the check character. It can be written as a short script or a long formula. It catches most random typing errors, though not a number that is well-formed but unregistered.
How to place an order
Ordering find gst in a spreadsheet data takes three steps. First, tell us your target location, industry and campaign goal. Next, review a free sample of find gst in a spreadsheet records in Excel or CSV. You can also explore our GST purchase database and state-wise data, and confirm any registration in GST records.
Frequently asked questions
Can Excel tell me if a GSTIN is real?
Excel can check format only. A formula can also implement the check-character algorithm if you need deeper validation, but to confirm that a registration is active you must check GST records or use an authorised verification service.
How do I find GST amounts for a whole column of prices?
Enter the formula once in the first row and drag it down, or use an array formula such as =ARRAYFORMULA(B2:B/(1+C2:C)) in an online spreadsheet.
Why does my GST amount differ by a rupee?
Rounding. Invoice software typically rounds tax per line or per invoice. Decide on one method and keep it consistent with your accounting system.
Can I extract GSTINs from a scanned invoice?
You need OCR software first to convert the image to text, then apply the same pattern. Always verify the output manually for important documents.
Need lists of businesses to work with?
We provide business data by industry, city, state and pincode, which can help you build and clean your prospect and vendor lists. Contact us with your needs and we will explain what is available and how it can be used properly.
From requirement to data in four steps
A simple process with a sample before any purchase.
Share your target
Location, industry and campaign goal.
Review a sample
Check format, fields and relevance.
Confirm the pack
Finalise scope and volume.
Start outreach
Import the file and begin follow-up.
More guides on GST data
GST Data Providers in Hyderabad
Discover top GST data providers in Hyderabad. Learn how to leverage their information to boost sales and find tailored records for your…
GST Sales Entry of Company Books for Every Kind of Supply
GST sales entry of company books for every supply: intra-state, inter-state, export, consumer sale and credit note entries, with worked entries in…
B2B GST Data Provider
B2B GST data provider guide for first-time buyers: a thirty-day plan from brief to sample test, pilot order and results review.
Related data categories
Request a Free Sample
Share your target location, industry and campaign goal. Review sample records before choosing the final pack.
