Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
photon63
 
Posts: n/a
Default Quick method to add absolute references in Excel using keyboard

It would be useful for absolute references to be added in Excel when holding
a key down on the keyboard, instead of having to re-edit each cell every
time. Say, hold down the mouse button, press 'r' to toggle rows between
absolute and relative, and the same for 'c' and columns.
  #2   Report Post  
Smuggy
 
Posts: n/a
Default

Here's an excellent routine for you, gives you two subroutines Reltoabs and
Abstorel which you could then assign to keyboard shortcut or to an icon on
toolbar...

Sub ReltoAbs()
Dim Cell As Range
For Each Cell In Selection
Cell.Formula = Application.ConvertFormula(Cell.Formula, xlA1, xlA1,
xlAbsolute)
Next
End Sub

Sub AbstoRel()
Dim Cell As Range
For Each Cell In Selection
Cell.Formula = Application.ConvertFormula(Cell.Formula, xlA1, xlA1,
xlRelative)
Next
End Sub

Sub RelColAbsRows()
Dim Cell As Range
For Each Cell In Selection
Cell.Formula = Application.ConvertFormula(Cell.Formula, xlA1, xlA1,
xlAbsRowRelColumn)
Next
End Sub

Sub RelRowsAbsCol()
Dim Cell As Range
For Each Cell In Selection
Cell.Formula = Application.ConvertFormula(Cell.Formula, xlA1, xlA1,
xlRelRowAbsColumn)
Next
End Sub


Steve
PS. I wish I could claim the credit for this, but I can't - thought I would
post it for you anyway.




"photon63" wrote:

It would be useful for absolute references to be added in Excel when holding
a key down on the keyboard, instead of having to re-edit each cell every
time. Say, hold down the mouse button, press 'r' to toggle rows between
absolute and relative, and the same for 'c' and columns.

  #3   Report Post  
photon63
 
Posts: n/a
Default

Thanks - much appreciated :)

"Smuggy" wrote:

Here's an excellent routine for you, gives you two subroutines Reltoabs and
Abstorel which you could then assign to keyboard shortcut or to an icon on
toolbar...

Sub ReltoAbs()
Dim Cell As Range
For Each Cell In Selection
Cell.Formula = Application.ConvertFormula(Cell.Formula, xlA1, xlA1,
xlAbsolute)
Next
End Sub

Sub AbstoRel()
Dim Cell As Range
For Each Cell In Selection
Cell.Formula = Application.ConvertFormula(Cell.Formula, xlA1, xlA1,
xlRelative)
Next
End Sub

Sub RelColAbsRows()
Dim Cell As Range
For Each Cell In Selection
Cell.Formula = Application.ConvertFormula(Cell.Formula, xlA1, xlA1,
xlAbsRowRelColumn)
Next
End Sub

Sub RelRowsAbsCol()
Dim Cell As Range
For Each Cell In Selection
Cell.Formula = Application.ConvertFormula(Cell.Formula, xlA1, xlA1,
xlRelRowAbsColumn)
Next
End Sub


Steve
PS. I wish I could claim the credit for this, but I can't - thought I would
post it for you anyway.




"photon63" wrote:

It would be useful for absolute references to be added in Excel when holding
a key down on the keyboard, instead of having to re-edit each cell every
time. Say, hold down the mouse button, press 'r' to toggle rows between
absolute and relative, and the same for 'c' and columns.

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
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
quick books and excel 2002 bookeeper New Users to Excel 2 February 7th 05 06:09 PM
Excel should have a quick and simple "change case" function like . NinaSvendsen Excel Worksheet Functions 1 January 28th 05 03:15 PM
Pivot tables Excel 2003 absolute references Poj Excel Discussion (Misc queries) 2 January 25th 05 12:57 PM
Why is pointer and keyboard control is lost in certain Excel file. MarkB3 Excel Discussion (Misc queries) 0 January 4th 05 07:15 PM


All times are GMT +1. The time now is 05:57 PM.

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

About Us

"It's about Microsoft Excel"