PDA

View Full Version : [SOLVED:] Add to Column Next to Selection



Emoncada
02-06-2014, 09:20 AM
I have a script that copies the selected cells and pastes them into another workbook.

What I need to do is after the paste is done I would like to add "Submitted" into the next column of the selected rows.

So if selected cells are (A2:H30) after paste is completed I would like (I2:I30) to get "Submitted"

Can this be done?

lecxe
02-06-2014, 09:58 AM
Hi

See if this helps.

Assuming you start with A1:H30 selected:



Dim r As Range

Set r = Selection

' do the copy paste or whatever you need
'...

' write "Submitted" to the right of r
r.Offset(, r.Columns.Count).Resize(, 1).Value = "Submitted"

Emoncada
02-06-2014, 01:20 PM
That worked, Thanks Lecxe.

lecxe
02-06-2014, 01:50 PM
You're welcome. Thanks for the feedback.