Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

VBA Insert data into next blank row from different worksheets

$
0
0

My objective is to be able to list all of the requests of users on the Status worksheet from different user-entered worksheets (BTW, not all worksheets are required to be entered by users.) Example of worksheets are: Create, Update, Extend, Delete. The program I came up with gets the value from Create but once the Update value is filled it just overwrites the ones from Create. Can somebody please help?

This is the code I came up with

Sub commit()Dim a As IntegerDim b As IntegerDim c As IntegerDim d As IntegerDim count As Integer    Sheet1.Range("M1").Value = "=counta(F5:F8)+3"    Sheet4.Range("A1").Value = "=counta(E3:E100)+2"    Sheet13.Range("A1").Value = "=counta(E3:E100)+2"count = WorksheetFunction.CountA(Sheet24.Range("A:A"))For b = 3 To Sheet4.Range("A1").ValueSheet24.Range("XFD1").Value = "=counta(a2:a100)+2"a = Sheet24.Range("XFD1").Valuec = Sheet1.Range("M1").Valued = Sheet13.Range("A1").Value'create    Sheet24.Range("A" & count).Value = Sheet4.Range("B" & b).Value    Sheet24.Range("C" & count).Value = Sheet4.Range("D" & b).Value    Sheet24.Range("D" & count).Value = Sheet4.Range("F" & b).Value    Sheet24.Range("E" & count).Value = Sheet4.Range("J" & b).Value    Sheet24.Range("G" & count).Value = Sheet1.Range("F" & c).Value'update-description    Sheet24.Range("A" & count + 1).Value = Sheet13.Range("B" & d).Value 'maintenance request code    Sheet24.Range("C" & count + 1).Value = Sheet13.Range("D" & d).Value 'line number    Sheet24.Range("D" & count + 1).Value = Sheet4.Range("F" & b).Value 'mattype code    Sheet24.Range("E" & count + 1).Value = Sheet4.Range("G" & b).Value 

Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>