copying one column to another in vba excel

Hi

I have a column (A) in an Excel spreadsheet which I want to copy to another column (B).

Column A contains calculated values. I only want to copy the values from column A to column B (not the formulas).

Can anybody give me some VBA code which will do this?

I have named the range of column A as "end" and column B as "previous".

Many thanks in advance

Issac
IssacJonesAsked:
Who is Participating?
 
KyleSWCommented:
If the code is in the sheet of where you have the ranges, you can use

Range("Previous").Value = Range("End").Value

Open in new window


Otherwise, you'll need to qualify the sheet also:

Sheets("Sheet1").Range("Previous").Value = Sheets("sheet1").Range("End").Value

Open in new window


Does this help?
0
 
Anuradha GoliSystems Development / Support SpecialistCommented:
Range("End").Copy
Worksheets("Sheet1").Range("Previous").PasteSpecial xlPasteValues
0
 
IssacJonesAuthor Commented:
Excellent
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.