KEMBAR78
Excel Codes and Special Formula | PDF
0% found this document useful (0 votes)
27 views3 pages

Excel Codes and Special Formula

The document outlines a procedure for importing GSTR-1 data with specific file naming conventions. It includes code for handling data transfer between worksheets, ensuring values and formats are pasted efficiently. Additionally, it addresses error handling for file opening issues and provides user feedback upon completion.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views3 pages

Excel Codes and Special Formula

The document outlines a procedure for importing GSTR-1 data with specific file naming conventions. It includes code for handling data transfer between worksheets, ensuring values and formats are pasted efficiently. Additionally, it addresses error handling for file opening issues and provides user feedback upon completion.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 3

LINK

IMPORT GSTR-1 DATA

Conditions: File name - Entity Name - GSTR-1 - Month Name --> Suchi - GSTR-1 - Apr'25, same conditi
https://chatgpt.com/share/68401316-0ad4-8012-9317-7d2b09c13891

formulaFlags(r, c) = False
dataValues(r, c) = sourceCell.Value
End If
Else
formulaFlags(r, c) = False
dataValues(r, c) = sourceCell.Value
End If
Next c
Next r

' Paste values/formulas in bulk


targetWS.Range("A1").Resize(lastRow, lastCol).Value2 = dataValues

' Paste formats (this is safe and fast)


sourceWS.UsedRange.Copy
targetWS.Range("A1").PasteSpecial xlPasteFormats
Application.CutCopyMode = False

sourceWB.Close SaveChanges:=False
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic

MsgBox "Optimized import completed successfully!", vbInformation


Exit Sub

ErrorHandler:
MsgBox "Could not open file: " & gstr1FileName, vbCritical
If Not sourceWB Is Nothing Then sourceWB.Close SaveChanges:=False
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic

End Sub
Outward Supply"

You might also like