Insert row data on Sheet2 based on sheet1 cell value(text)
Closed
anilkarthik
Posts
1
Registration date
Saturday 10 May 2014
Status
Member
Last seen
10 May 2014
-
10 May 2014 à 07:03
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 - 4 Jun 2015 à 10:46
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 - 4 Jun 2015 à 10:46
Related:
- Insert row data on Sheet2 based on sheet1 cell value(text)
- Insert key on keyboard - Guide
- Saints row 2 cheats - Guide
- Conditional formatting based on another cell text - Excel Forum
- Based on the values in cells b77 - Excel Forum
- How to copy data from one excel sheet to another - Guide
2 responses
TrowaD
Posts
2921
Registration date
Sunday 12 September 2010
Status
Contributor
Last seen
27 December 2022
555
13 May 2014 à 10:39
13 May 2014 à 10:39
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 12 September 2010
Status
Contributor
Last seen
27 December 2022
555
18 May 2015 à 11:39
18 May 2015 à 11:39
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
12 May 2015 à 17:18
If Target.Value = "RC" Then
I am not able to troubleshoot how to fix this. Any help would be greatly appreciated!
2 Jun 2015 à 14:41
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!!!
4 Jun 2015 à 10:46
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