Help with current VBA code (keeping cell value in same worksheet)

ArmyGuy1

New Member
Joined
Sep 20, 2015
Messages
1
Hi, I'm new to all this but have been able to receive a lot of help just by googling my question and finding it on your website. Unfortunately, this has gotten me only so far in my project and I figured I might as well create an account with you guys and get specific help tailored to my needs. I am using Excel 2013.

I'm a Paralegal in the Army and I'm creating a tracker that identifies all sorts of data. When a legal action is complete -- and is marked as complete in the target cell -- it automatically copies and paste the entire row from the active sheet to another sheet in the workbook.

I have the code for that and it works perfect, but I need it to do more.

In addition to the above, there are certain cells within a row that I want to copy the number value from and move it from that cell to another cell in the same worksheet. The cell will only be pasted when the target row is marked as "COMPLETE". For example, the company took 20 days to get a legal action to me. That "20" will automatically be copied and pasted from one cell to another. Once I receive the action, it took me 7 days to complete it. Again, the 7 days will be moved from its home cell to another cell in the same worksheet (preferably right next to the 20 destination). Again, these cells will only be copied when the action is marked as complete.

Here's a sample of what my worksheet looks like:

......A.......... B.............. P................................ AL
1 ///Entire Row Purposely Left Blank///
2 (TITLE) (TITLE).....(DAYS TO PARALEGAL).....(COMPLETE)
3 (DATA) (DATA).....(VALUE)..........................(COMPLETE)
4 (DATA) (DATA).....(VALUE)..........................(NO)
5 (DATA) (DATA).....(VALUE)..........................(COMPLETE)

Specifically, the columns containing the values that would have to be copied would be found in "P", "T" and "AJ", then pasted in columns "A14", "B14" and "C14" respectively on the same worksheet. Every time a new row is marked as "COMPLETE" those same identified columns will have to move to the next row available row under row 14.

Here is what my current code looks like:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 38 Then
If UCase(Target.Value) = "COMPLETE" Then
Target.EntireRow.Copy Destination:=Sheets("ALL Completed Chapters"). _
Range("A" & Rows.Count).End(xlUp).Offset(1)
End If
End If
End Sub

If anyone is able to assist me in this, can you please also explain how the code is added to my current code? Is it something as simple as just pasting the new code under the current, or will the codes have to be combined?

I apologize ahead of time for the long post, I just wanted to make sure I gave you as much information as I possibly could.

Thank you in advance for any help!
 
Last edited:

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top