snasui.com ยินดีต้อนรับ ยินดีต้อนรับสู่กระดานถามตอบ Excel and VBA และอื่น ๆ ที่เป็นมิตรกับทุกท่าน มีไฟล์แนบมหาศาล ช่วยให้ท่านค้นหาและติดตามศึกษาได้โดยง่าย สมาชิกท่านใดที่ยังไม่ได้ระบุ Version ของ Excel ที่ใช้งานจริง สามารถทำตาม Link นี้เพื่อจะได้รับคำตอบที่ตรงกับ Version ของท่านครับ ระบุ Version ของ Excel
Hi Dear
Sorry for not clear explanation.
The source data is in Sheet Menu.The data from B11:Ixx coming from Source C1:C8 data entries.the main point of this template I want to create accrued expenses tracking by inputing data in Sheet Menu including PL Code and GL Code but the PL and GL in the same line(row) but in the JV it should be line separately.it means Dr PL(exp) and Cr GL(accrued expenses) and it should be like K10:M13.in JV sheet
Debit Credit amount
61095 100
USD17223 (100)
Dim n As Long, t As Long
With S1
t = .Range("h" & .Rows.Count).End(xlUp).Row + 1
.Range("b" & t).Resize(1, 6).Value = _
Application.Transpose(.Range("c1:c6").Value)
.Range("h" & t + 1).Value = .Range("c7").Value
.Range("c1:c8").ClearContents
.Range("c1").Select
End With
Dim r As Range
S1.Range("g11:h1000").Copy S2.Range("a11")
S1.Range("d11:d1000").Copy S2.Range("d11")
For Each r In S2.Range("d11:d" & S2.Range("d" & S2.Rows.Count).End(xlUp).Row + 1)
If r.Value = "" Then
r.Value = -r.Offset(-1, 0).Value
End If
Next r
S1.Range("e11:e1000").Copy S2.Range("e11")
For Each r In S2.Range("e11:e" & S2.Range("e" & S2.Rows.Count).End(xlUp).Row + 1)
If r.Value = "" Then
r.Value = r.Offset(-1, 0).Value
End If
Next r
Thank you so much . another way I use above code to add to your code but
In your code provided,I need to look up account name from PL or GL in Sheet Journal but don't require formula just values
I mean I want to copy from Sheet menu to sheet Listing base on header.in JV I need to look up account name from COA but my code not work well in Module 2 and 3
I need to copy from data in sheet Menu to Sheet Listing without blank rows base on column headers.fill account name in Sheet Journal as in Sample attached file
I upload sample with expected Result and code update in Book1(3).xlsm
In Sheet Listing I need to copy data from Sheet Menu matching column headers in Sheet Listing and paste here.In Sheet JV I need to look up account name from Sheet COA by using Vlookup in vba and convert to values.
Hi Dear ,
Now come up with issue.I have withholding tax so how do I amend code to be like in Sheet Menu and Sheet Journal.I mean as soon as I put data entry click button add it will show like Menu and I click journal button it will show as journal sheet.
please kindly help
Thank in advance