![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Posts: 1,288
|
I have a sheet with in column B1:B5000 stock prices.In each of these cells there is the same formule.Now I want a macro that automaticly makes a copy from all these formules from column B to column C and the formules in column B deleted.
Have anyone such a macro? Thanks |
|
|
|
|
|
#2 |
|
Legend
Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,704
|
How's this:
Sub theCutter() [b1:b5000].Cut Destination:=[c1] End Sub Hope this helps. |
|
|
|
|
|
#3 | |
|
Board Regular
Join Date: Mar 2002
Posts: 1,288
|
Quote:
|
|
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Feb 2002
Location: Perth Australia
Posts: 1,567
|
Hi
You could give this a try Range("B1:B5000").Copy Range("C1").Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Range("B1:B5000").Select Application.CutCopyMode = False Selection.SpecialCells(xlCellTypeFormulas, 23).Select Selection.ClearContents End Sub Or, if you mean you also want to convert the formulas in column B to values as well, then: Range("B1:B5000").Copy Range("C1").Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Range("B1:B5000").Copy Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Application.CutCopyMode = False End Sub Regards Derek [ This Message was edited by: Derek on 2002-03-20 01:30 ] |
|
|
|
|
|
#5 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
Hi
Try this method Sub Doit() Range("C1:C5000") = Range("B1:B5000").Formula Range("B1:B5000") = Range("B1:B5000").Value End Sub |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|