ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   how do I paste without EXCEL increasing the cell number ? (https://www.excelbanter.com/excel-worksheet-functions/83803-how-do-i-paste-without-excel-increasing-cell-number.html)

cgs

how do I paste without EXCEL increasing the cell number ?
 
How do I cut and paste formulas and resultents with out EXCEL increasing the
cell number ?

Ron Coderre

how do I paste without EXCEL increasing the cell number ?
 
I seems like you need to set parts of your references to be Absolute, instead
of Relative.

In a formula, a dollar sign ($) locks in that part of the reference.

Examples:
A1: =$C3

When copied and pasted elsewhere in the worksheet, that formula will ALWAYS
reference Col_C, but the referenced row will change.

A1: =$C$3
will always reference cell C3 no matter where it is pasted.

For more information, search Excel help for "range references" and read the
section on:
"The difference between relative and absolute references"

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"cgs" wrote:

How do I cut and paste formulas and resultents with out EXCEL increasing the
cell number ?


Don Guillett

how do I paste without EXCEL increasing the cell number ?
 
use absolutes
$a$1

--
Don Guillett
SalesAid Software

"cgs" wrote in message
...
How do I cut and paste formulas and resultents with out EXCEL increasing
the
cell number ?




Peo Sjoblom

how do I paste without EXCEL increasing the cell number ?
 
Use absolute cell references as in

$A$1

or

A$1

if it is just the number you want to prevent increasing

as opposed to A1


--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com



"cgs" wrote in message
...
How do I cut and paste formulas and resultents with out EXCEL increasing
the
cell number ?




[email protected]

how do I paste without EXCEL increasing the cell number ?
 
"cgs" wrote:
How do I cut and paste formulas and resultents with
out EXCEL increasing the cell number ?


Although changing relative references to absolute references
might be the best solution for you, there are times when
you might want to do exactly as you stated, retaining the
relative references for some other purpose, e.g. so that they
are indeed modified appropriately when you subsequently
copy-and-paste.

Since you say __cut__ and paste, not copy, a cell move
might meet your needs. Highlight the cells to "cut", then
move the cursor to the highlight border so that you see a
four-way-arrow cursor, then drag the cells to where you
want them. Excel modifies relative references to cells
within the moved cell block, but other relative references
are unmodified.

In cases where I actually want to __copy__ and paste, I
have resorted to a text copy-and-paste. This is unpleasant
because it must be done one cell at a time. Highlight one
cell and copy the text of the formula in the "fx" field.
Press Esc to deselect the cell, then highlight the new
location, then do paste.

Harlan Grove

how do I paste without EXCEL increasing the cell number ?
 
wrote...
....
In cases where I actually want to __copy__ and paste, I
have resorted to a text copy-and-paste. This is unpleasant
because it must be done one cell at a time. Highlight one
cell and copy the text of the formula in the "fx" field.
Press Esc to deselect the cell, then highlight the new
location, then do paste.


If the formulas to be copied exactly were in a single area range,
easier to select that range, Edit Replace = with |=, copy then paste
elsewhere, then select both copied and pasted ranges and Edit Replace
|= with =. If that still too unpleasant, use a macro.


Sub foo()
Dim r As Range, ac As Variant

If Not TypeOf Selection Is Range Then Exit Sub

On Error Resume Next

Set r = Application.InputBox( _
Prompt:="Select paste range", _
Title:="Formula Copy", _
Type:=8 _
)

If Err.Number < 0 Or r Is Nothing Then
Err.Clear
Exit Sub
ElseIf r.Cells.Count < Selection.Cells.Count Then
Set r = r.Cells(1).Resize(Selection.Rows.Count,
Selection.Columns.Count)
End If

On Error GoTo CleanUp

ac = Application.Calculation
Application.Calculation = xlCalculationManual

Selection.Replace What:="=", Replacement:="|=", lookat:=xlPart
Selection.Copy Destination:=r
Union(Selection, r).Replace What:="|=", Replacement:="=",
lookat:=xlPart

CleanUp:
Application.Calculation = ac

End Sub



All times are GMT +1. The time now is 03:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com