Copy and Paste from Active cells

Bones55

New Member
Joined
Feb 23, 2017
Messages
20
I have a script that currently copies the “Active Cell” which will always be between K123:K149 depending on which one is active. These cells hold the users first name which is copied into the last row of Column “C”.
What I need to do is copy the cell to the right of K123 (L123) at the same time and copy it to Column “B”
Example:
K123 “active cell” shows Jane Doe, in L123 is her team name “Ocean_Channel_Services” I need to copy her name to the last row of column “C” example “C123” and the Team name to “B123”

This is a partial script…
Sub Testing()

ActiveCell.Copy
Range("C" & Rows.Count).End(xlUp).Offset(1).Select
ActiveCell.PasteSpecial xlPasteValues
Application.CutCopyMode = False
Sheets("Role Call").Range("L122").Value = "Type Name Here"
Range("L122").Select

End Sub

How do I get the script to understand that I also want her team copied and pasted in "B" row?

Thanks for any assistance.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Update to this initial post I found I can use this script to copy both K123 and L123, but can't figure out how to paste L123 In column B and K123 in column C...It would be too much work to change all the formulas to make this paste first name in "column C" and group name in "Column B"


this is what I have so far which works, but puts username in column B and group in column C
Sub CopyActCell()
Range(ActiveCell, ActiveCell.Offset(0, 1)).Copy
Range("C" & Rows.Count).End(xlUp).Offset(1).Select
ActiveCell.PasteSpecial xlPasteValues
Application.CutCopyMode = False
End Sub
 
Last edited:
Upvote 0
How about
Code:
Sub Swap2()
   Range("B" & Rows.Count).End(xlUp).Offset(1).Resize(, 2).Value = Array(ActiveCell.Offset(, 1), ActiveCell)
End Sub
 
Upvote 0
Glad to help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,315
Members
452,634
Latest member
cpostell

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