Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

cut and paste replacement

Forum home » Delegate support and help forum » Microsoft Excel Training and help » Cut and paste replacement values

Cut and paste replacement values

ResolvedVersion 2013

Bryony has attended:
Excel VBA Introduction course

Cut and paste replacement values

I wish to be able to identify blank cells in column A (for example), and if blank, to cut and paste the value from column B (corresponding row)into column A.

RE: Cut and paste replacement values

Hi Bryony,

Thank you for the forum question.

The code below can do the job. In my example I run through the range A6:A500. You will may be need to change this.


Sub CopyColB()
For Each cell In Range("a6:a500").SpecialCells(xlCellTypeBlanks)
cell.Value = cell.Offset(0, 1)
Next cell

End Sub




Kind regards

Jens Bonde
Microsoft Office Specialist Trainer

Tel: 0207 987 3777
Best STL - https://www.stl-training.co.uk
98%+ recommend us

London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector

RE: Cut and paste replacement values

Hi Bryony,

I am sorry.

You want to cut. Then the code will be:

Sub CopyColB()
For Each cell In Range("a6:a500").SpecialCells(xlCellTypeBlanks)
cell.Value = cell.Offset(0, 1)
cell.Offset(0, 1).ClearContents

Next cell


End Sub

Kind regards

Jens Bonde
Microsoft Office Specialist Trainer

Tel: 0207 987 3777
Best STL - https://www.stl-training.co.uk
98%+ recommend us

London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector

Fri 15 Jul 2016: Automatically marked as resolved.

Excel tip:

Create a hyperlink navigation sheet

In large files, it is often useful to have a front sheet with hyperlinks to the key databases and summary calculations in your spreadsheet. Hyperlinks can save you and (more importantly) those less familiar with your spreadsheet a great deal of pointless scrolling between and within sheets.



Hyperlinks appear as underlined text and can jump to any cell or range name in your file. You can also use hyperlinks to jump to other files.



To create a hyperlink to a location in the active workbook: (1) Select the cell that contains the text you want to use as the hyperlink and choose Insert|Hyperlink.(2)Click Place in this document.(3)Choose the sheet you want to link to or the range name from the list of "Defined Names".(4)If necessary, type the cell reference in the Type in the cell reference box. (5) Click OK.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.22 secs.