Insert row data on Sheet2 based on sheet1 cell value(text)
Closed
anilkarthik
Posts
1
Registration date
Saturday May 10, 2014
Status
Member
Last seen
May 10, 2014
-
May 10, 2014 at 07:03 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Jun 4, 2015 at 10:46 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Jun 4, 2015 at 10:46 AM
Related:
- Insert row data on Sheet2 based on sheet1 cell value(text)
- Insert draft watermark in word on all pages - Guide
- Insert key on laptop - Guide
- Tmobile data usage text - Guide
- Saints row 2 cheats - Guide
- How to insert a tick on word - Guide
2 responses
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
May 13, 2014 at 10:39 AM
May 13, 2014 at 10:39 AM
Hi Anilkarthik,
If I understand you correctly, you want to copy row from sheet1 to sheet2 whenever "RC" is entered in Column D.
To do so, right-click sheet1's tab and select view code. Paste the code below in the big white field:
Best regards,
Trowa
If I understand you correctly, you want to copy row from sheet1 to sheet2 whenever "RC" is entered in Column D.
To do so, right-click sheet1's tab and select view code. Paste the code below in the big white field:
Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Columns("D:D")) Is Nothing Then Exit Sub If Target.Value = "RC" Then Target.EntireRow.Copy Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1, 0) End If End Sub
Best regards,
Trowa
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
May 18, 2015 at 11:39 AM
May 18, 2015 at 11:39 AM
Hi Lack,
My guess would be that you selected more then one cell when changing column D. This could happen when clear data from multiple cells.
To prevent this you can add the following code line between the 2nd and the 3rd code line:
If Target.Cells.Count > 1 Then Exit Sub
Does that help?
Best regards,
Trowa
My guess would be that you selected more then one cell when changing column D. This could happen when clear data from multiple cells.
To prevent this you can add the following code line between the 2nd and the 3rd code line:
If Target.Cells.Count > 1 Then Exit Sub
Does that help?
Best regards,
Trowa
May 12, 2015 at 05:18 PM
If Target.Value = "RC" Then
I am not able to troubleshoot how to fix this. Any help would be greatly appreciated!
Jun 2, 2015 at 02:41 PM
there is a drop down box on the upper right hand side with options such as activate, change, calculate, deactivate, etc
thanks in advance for your assistance!!!
Jun 4, 2015 at 10:46 AM
The code will run automatically. So after pasting the code go back to Excel and enter the value "RC" anywhere in column D and the row will be copied to sheet 2, if you haven't altered the code.
Best regards,
Trowa