|
-
Nov 7th, 2012, 07:40 AM
#1
Thread Starter
PowerPoster
[RESOLVED] Pastespecial xlPasteValues same column
Hi there,
Column I has formulas (=G1+H1) which need to become values. What I was thinking was to simply copy the column and use pastespecial to paste it again.
Code:
Columns("I").Copy
Columns("I").PasteSpecial Paste:=xlPasteValues
Nothing seems to happen.
What am, I doing wrong here? Thanks in advance.
-
Nov 7th, 2012, 08:20 AM
#2
Re: Pastespecial xlPasteValues same column
Try this:
Code:
Sub psvals()
Range("i1").EntireColumn.Copy
Range("i1").PasteSpecial xlPasteValues
End Sub
-
Nov 7th, 2012, 08:59 AM
#3
Thread Starter
PowerPoster
Re: Pastespecial xlPasteValues same column
Seems something is going absolutely wrong.
This is my code to add the Formula and then copy/paste it as Value
Code:
With Range("I2")
.FormulaR1C1 = "=RC[-2]+RC[-1]"
'.AutoFill Destination:=Range(.Offset(0, -1), .Offset(0, -1).End(xlDown)).Offset(0, 1)
.AutoFill .Resize(.Offset(Rows.Count - .Row, -1).End(xlUp).Row)
End With
Range("I1").EntireColumn.Copy
Range("I1").PasteSpecial xlPasteValues
The complete "usedrange" of column-I get's the value of I1.
Means when !i have the sum of 100, every cell in the "usedrange" of column-I get's the value of 100. Hope I said that right.
What could be the issue?
-
Nov 7th, 2012, 10:31 AM
#4
Re: Pastespecial xlPasteValues same column
I'm not following. Can you zip and attach your example?
-
Nov 7th, 2012, 10:45 AM
#5
Thread Starter
PowerPoster
Re: Pastespecial xlPasteValues same column
It has sensitive information, but I can mail it to you of you'd send me you e-mail via PM.
-
Nov 8th, 2012, 02:15 AM
#6
Re: Pastespecial xlPasteValues same column
1. Are macros enabled?
2. If macros are enabled then you need to fully qualify the sheet names... See this code
Code:
Sub Sample()
Dim ws As Worksheet
Set ws = ThisWorkbook.Sheets("Sheet1")
With ws
.Columns(9).Copy
.Columns(9).PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
End With
End Sub
OR
Code:
Sub Sample()
Dim ws As Worksheet
Set ws = ThisWorkbook.Sheets("Sheet1")
With ws
.Range("I:I").Value = .Range("I:I").Value
End With
End Sub
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Nov 10th, 2012, 01:40 PM
#7
Thread Starter
PowerPoster
Re: Pastespecial xlPasteValues same column
Completely EDIT POST
The result is the issue again 
Talk to you tomorrow.
Last edited by Radjesh Klauke; Nov 10th, 2012 at 01:52 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|