0% found this document useful (0 votes)
8 views1 page

Code 2

The code snippet processes data from multiple worksheets, specifically writing values from the first sheet into designated columns A-E of a summary sheet. It captures the name, code, ID, currency, and year from the first sheet, while subsequent sheets only write values to a specific column. After processing all sheets, it adjusts the column widths and restores screen updating and alerts.

Uploaded by

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

Code 2

The code snippet processes data from multiple worksheets, specifically writing values from the first sheet into designated columns A-E of a summary sheet. It captures the name, code, ID, currency, and year from the first sheet, while subsequent sheets only write values to a specific column. After processing all sheets, it adjusts the column widths and restores screen updating and alerts.

Uploaded by

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

If isFirstSheet Then

' Chỉ sheet đầu tiên mới ghi cột A-E


With wsTotal
.Cells(totalRowCount, 1).Value = [Link](i, 1).Value ' Name
.Cells(totalRowCount, 2).Value = fullCode ' Code
.Cells(totalRowCount, 3).Value = companyCode ' ID
.Cells(totalRowCount, 4).Value = [Link](i, 3).Value ' Currency
.Cells(totalRowCount, 5).Value = [Link](i, 4).Value ' Year
End With
End If

' Ghi cột giá trị


[Link](totalRowCount, colIndex).Value = [Link](i, 5).Value
totalRowCount = totalRowCount + 1
Next i

' Sau sheet đầu tiên, reset dòng


totalRowCount = 2
colIndex = colIndex + 1
isFirstSheet = False
End If
Next ws

[Link]
[Link] = True
[Link] = True

You might also like