• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 374
  • Last Modified:

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
0
IssacJones
Asked:
IssacJones
1 Solution
 
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 GoliCommented:
Range("End").Copy
Worksheets("Sheet1").Range("Previous").PasteSpecial xlPasteValues
0
 
IssacJonesAuthor Commented:
Excellent
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now