Solved

# copying one column to another in vba excel

Posted on 2012-09-07
358 Views
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".

Issac
0
Question by:IssacJones

LVL 5

Accepted Solution

If the code is in the sheet of where you have the ranges, you can use

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

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

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

Does this help?
0

LVL 12

Expert Comment

Range("End").Copy
Worksheets("Sheet1").Range("Previous").PasteSpecial xlPasteValues
0

Author Closing Comment

Excellent
0

## Featured Post

### Suggested Solutions

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…