Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Copy without reference cells

Hi, I have a few hundred of formulas such as this throughout my excel
file: =IF("L2"1,L2,"")

I need to copy/paste these formulas down about 50 rows, Without the
formulas correcting their cell references. Is this possible?

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 33
Default Copy without reference cells


Uzytkownik napisal w wiadomosci
ups.com...
Hi, I have a few hundred of formulas such as this throughout my excel
file: =IF("L2"1,L2,"")

I need to copy/paste these formulas down about 50 rows, Without the
formulas correcting their cell references. Is this possible?

=IF("L2"1,L2,"")
use $l2 or l$2 or $l$2
try all of them and see behaviour of your formulas
u can use F4 to switch between those options ( when L2 in formula is
hihglighted )
mcg



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Copy without reference cells

Lock the cell references by adding $ signs.

IF("$L$2"1,$L$2,"")

To change many at a time use a macro. First macro is the one you need. The
others are just for you to keep in case.

Sub Absolute()
Dim cell As Range
For Each cell In Selection
If cell.HasFormula Then
cell.Formula = Application.ConvertFormula _
(cell.Formula, xlA1, xlA1, xlAbsolute)
End If
Next
End Sub

Sub AbsoluteRow()
Dim cell As Range
For Each cell In Selection
If cell.HasFormula Then
cell.Formula = Application.ConvertFormula _
(cell.Formula, xlA1, xlA1, xlAbsRowRelColumn)
Next
End Sub

Sub AbsoluteCol()
Dim cell As Range
For Each cell In Selection
If cell.HasFormula Then
cell.Formula = Application.ConvertFormula _
(cell.Formula, xlA1, xlA1, xlRelRowAbsColumn)
Next
End Sub

Sub Relative()
Dim cell As Range
For Each cell In Selection
If cell.HasFormula Then
cell.Formula = Application.ConvertFormula _
(cell.Formula, xlA1, xlA1, xlRelative)
Next
End Sub

If not familiar with VBA and macros, see David McRitchie's site for more on
"getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + R to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Run the macros by going to ToolMacroMacros.

You can also assign these macros to a button or a shortcut key combo.



Gord Dibben MS Excel MVP

On 7 Aug 2006 11:59:52 -0700, wrote:

Hi, I have a few hundred of formulas such as this throughout my excel
file: =IF("L2"1,L2,"")

I need to copy/paste these formulas down about 50 rows, Without the
formulas correcting their cell references. Is this possible?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy worksheet & maintain cell reference across worksheets dingy101 Excel Worksheet Functions 3 January 2nd 06 10:51 AM
checking that cells have a value before the workbook will close kcdonaldson Excel Worksheet Functions 8 December 5th 05 04:57 PM
Compare two cells from reference cells Mike K Excel Worksheet Functions 2 November 26th 05 02:07 PM
Expanding conditional formating with reference cells changing CCoop Excel Discussion (Misc queries) 2 May 4th 05 02:36 PM
copy group of cells to another group of cells using "IF" in third Chuckak Excel Worksheet Functions 2 November 10th 04 06:04 PM


All times are GMT +1. The time now is 09:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"