Adding data from other worksheets into one
Closed
gabe
-
Aug 10, 2009 at 08:20 AM
Excelguru Posts 261 Registration date Saturday April 11, 2009 Status Member Last seen June 21, 2011 - Aug 11, 2009 at 11:39 AM
Excelguru Posts 261 Registration date Saturday April 11, 2009 Status Member Last seen June 21, 2011 - Aug 11, 2009 at 11:39 AM
Related:
- Adding data from other worksheets into one
- Transfer data from one excel worksheet to another automatically - Guide
- Tmobile data check - Guide
- Display two columns in data validation list but return only one - Guide
- Gta 5 data download for pc - Download - Action and adventure
- Digital data transmission - Guide
5 responses
Excelguru
Posts
261
Registration date
Saturday April 11, 2009
Status
Member
Last seen
June 21, 2011
307
Aug 10, 2009 at 08:36 AM
Aug 10, 2009 at 08:36 AM
Target.Column will give you the column inwhich the change has occured.
to get all used columns in a sheet use ActiveSheet.UsedRange.Columns.Count
to get all used columns in a sheet use ActiveSheet.UsedRange.Columns.Count
Do you have any idea how I would identify the line that this was previously copied from in order to delete it on the Master?
Excelguru
Posts
261
Registration date
Saturday April 11, 2009
Status
Member
Last seen
June 21, 2011
307
Aug 10, 2009 at 12:09 PM
Aug 10, 2009 at 12:09 PM
"this was previously copied " - can you explain further
Sorry, I meant that if a line was already copied to the master once is there any way to identify it when data it again. What I wanted to do was delete the previously copied line in Master (not the line in original worksheet that the data was from) and insert the newly changed data where the old data was.
I tried doing this:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If ActiveSheet.UsedRange.Columns.Count Then
If Len(Trim(Target.Value)) <> 0 Then
Target.EntireRow.Copy Worksheets("Master").Cells( _
Rows.Count, "A").End(xlUp)(2)
Target.EntireRow.Delete <-
End If
End If
End Sub
But that only deletes the line in the original worksheet. I don't even know if it's possible to do what I want here, but thanks for your help so far.
I tried doing this:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If ActiveSheet.UsedRange.Columns.Count Then
If Len(Trim(Target.Value)) <> 0 Then
Target.EntireRow.Copy Worksheets("Master").Cells( _
Rows.Count, "A").End(xlUp)(2)
Target.EntireRow.Delete <-
End If
End If
End Sub
But that only deletes the line in the original worksheet. I don't even know if it's possible to do what I want here, but thanks for your help so far.
Didn't find the answer you are looking for?
Ask a question
Excelguru
Posts
261
Registration date
Saturday April 11, 2009
Status
Member
Last seen
June 21, 2011
307
Aug 11, 2009 at 11:39 AM
Aug 11, 2009 at 11:39 AM
What is particular in the data you copied
Then go through all the rows to check for that content then delete that 'entirerow'
Then go through all the rows to check for that content then delete that 'entirerow'