Welcome to Windows Help!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Unlocking Cells

 
   Windows Help (Home) -> Microsoft Excel RSS
Next:  Problem with update and delete  
Author Message
lj

External


Since: Jan 14, 2009
Posts: 2



(Msg. 1) Posted: Mon Mar 23, 2009 11:37 am
Post subject: Unlocking Cells
Archived from groups: microsoft>public>excel (more info?)

Hi, I'd like to know if there's a simple way to unlock or lock cells.
I'm not sure if "Lock" is the correct term here. For example, if you
have a formula that has C$14. Is there an easy way to unlock (remove
the "$") from the formula or to ad it without manually doing it?
Thanks for your help!

Lisa

 >> Stay informed about: Unlocking Cells 
Back to top
Login to vote
lisaj

External


Since: Mar 23, 2009
Posts: 3



(Msg. 2) Posted: Mon Mar 23, 2009 1:08 pm
Post subject: Re: Unlocking Cells
Archived from groups: per prev. post (more info?)

Thanks, this is helpful. What I'm trying to do is to change a whole
group of cells from relative to absolute. Is there a way to highlight
a whole group of cells and do that? How do I use a macro to do this?

On Mar 23, 11:50 am, Dave Peterson wrote:
> You can use a macro to change the reference style (absolute vs relative), but
> you can also do it manually.
>
> Select the portion of the formula (just a single cell reference or the entire
> formula if you want) and hit the F4 key to cycle through all 4 options.
>
> lj wrote:
>
> > Hi, I'd like to know if there's a simple way to unlock or lock cells.
> > I'm not sure if "Lock" is the correct term here.  For example, if you
> > have a formula that has C$14.  Is there an easy way to unlock (remove
> > the "$") from the formula or to ad it without manually doing it?
> > Thanks for your help!
>
> > Lisa
>
> --
>
> Dave Peterson

 >> Stay informed about: Unlocking Cells 
Back to top
Login to vote
Dave Peterson

External


Since: Oct 17, 2008
Posts: 38



(Msg. 3) Posted: Mon Mar 23, 2009 1:50 pm
Post subject: Re: Unlocking Cells
Archived from groups: per prev. post (more info?)

You can use a macro to change the reference style (absolute vs relative), but
you can also do it manually.

Select the portion of the formula (just a single cell reference or the entire
formula if you want) and hit the F4 key to cycle through all 4 options.



lj wrote:
>
> Hi, I'd like to know if there's a simple way to unlock or lock cells.
> I'm not sure if "Lock" is the correct term here. For example, if you
> have a formula that has C$14. Is there an easy way to unlock (remove
> the "$") from the formula or to ad it without manually doing it?
> Thanks for your help!
>
> Lisa
 >> Stay informed about: Unlocking Cells 
Back to top
Login to vote
lisaj

External


Since: Mar 23, 2009
Posts: 3



(Msg. 4) Posted: Mon Mar 23, 2009 1:57 pm
Post subject: Re: Unlocking Cells
Archived from groups: per prev. post (more info?)

On Mar 23, 1:44 pm, Dave Peterson wrote:
> First, each reference has 4 posibilities:
>
> $A$1  (both column and row are absolute references)
> $A1   (column is absolute, row is relative)
> A$1   (column is relative, row is absolute)
> A1    (both are relative)
>
> So here are 4 different macros from Gord Dibben:
>
> Option Explicit
> Sub AbsoluteCol()
> Dim Cell As Range
>     For Each Cell In Selection
>         If Cell.HasFormula Then
>             Cell.Formula = Application.ConvertFormula _
>                 (Cell.Formula, xlA1, xlA1, xlRelRowAbsColumn)
>         End If
>     Next Cell
> End Sub
> 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 Cell
> 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)
>         End If
>     Next Cell
> 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)
>         End If
>     Next Cell
> End Sub
>
> If you're new to macros:
>
> Debra Dalgleish has some notes how to implement macros here:[URL="http://www.contextures.com/xlvba01.html"]http://www.contextures.com/xlvba01.html[/URL]
>
> David McRitchie has an intro to macros:[URL="http://www.mvps.org/dmcritchie/excel/getstarted.htm"]http://www.mvps.org/dmcritchie/excel/getstarted.htm[/URL]
>
> Ron de Bruin's intro to macros:[URL="http://www.rondebruin.nl/code.htm"]http://www.rondebruin.nl/code.htm[/URL]
>
> (General, Regular and Standard modules all describe the same thing.)
>
> ==========
> Then you'll have to select the range of cells to fix and then hit alt-F8 (to see
> the macro dialogs), pick the one you want and run it.
>
> Just select the range to fix and run Gord's macro for the reference style you
> want.
>
>
>
>
>
> lisaj wrote:
>
> > Thanks, this is helpful.  What I'm trying to do is to change a whole
> > group of cells from relative to absolute.  Is there a way to highlight
> > a whole group of cells and do that?  How do I use a macro to do this?
>
> > On Mar 23, 11:50 am, Dave Peterson wrote:
> > > You can use a macro to change the reference style (absolute vs relative), but
> > > you can also do it manually.
>
> > > Select the portion of the formula (just a single cell reference or the entire
> > > formula if you want) and hit the F4 key to cycle through all 4 options.
>
> > > lj wrote:
>
> > > > Hi, I'd like to know if there's a simple way to unlock or lock cells.
> > > > I'm not sure if "Lock" is the correct term here.  For example, if you
> > > > have a formula that has C$14.  Is there an easy way to unlock (remove
> > > > the "$") from the formula or to ad it without manually doing it?
> > > > Thanks for your help!
>
> > > > Lisa
>
> > > --
>
> > > Dave Peterson
>
> --
>
> Dave Peterson- Hide quoted text -
>
> - Show quoted text -

Thanks, this is perfect!!
 >> Stay informed about: Unlocking Cells 
Back to top
Login to vote
Dave Peterson

External


Since: Oct 17, 2008
Posts: 38



(Msg. 5) Posted: Mon Mar 23, 2009 3:44 pm
Post subject: Re: Unlocking Cells
Archived from groups: per prev. post (more info?)

First, each reference has 4 posibilities:

$A$1 (both column and row are absolute references)
$A1 (column is absolute, row is relative)
A$1 (column is relative, row is absolute)
A1 (both are relative)

So here are 4 different macros from Gord Dibben:

Option Explicit
Sub AbsoluteCol()
Dim Cell As Range
For Each Cell In Selection
If Cell.HasFormula Then
Cell.Formula = Application.ConvertFormula _
(Cell.Formula, xlA1, xlA1, xlRelRowAbsColumn)
End If
Next Cell
End Sub
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 Cell
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)
End If
Next Cell
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)
End If
Next Cell
End Sub

If you're new to macros:

Debra Dalgleish has some notes how to implement macros here:
[URL="http://www.contextures.com/xlvba01.html"]http://www.contextures.com/xlvba01.html[/URL]

David McRitchie has an intro to macros:
[URL="http://www.mvps.org/dmcritchie/excel/getstarted.htm"]http://www.mvps.org/dmcritchie/excel/getstarted.htm[/URL]

Ron de Bruin's intro to macros:
[URL="http://www.rondebruin.nl/code.htm"]http://www.rondebruin.nl/code.htm[/URL]

(General, Regular and Standard modules all describe the same thing.)

==========
Then you'll have to select the range of cells to fix and then hit alt-F8 (to see
the macro dialogs), pick the one you want and run it.




Just select the range to fix and run Gord's macro for the reference style you
want.

lisaj wrote:
>
> Thanks, this is helpful. What I'm trying to do is to change a whole
> group of cells from relative to absolute. Is there a way to highlight
> a whole group of cells and do that? How do I use a macro to do this?
>
> On Mar 23, 11:50 am, Dave Peterson wrote:
> > You can use a macro to change the reference style (absolute vs relative), but
> > you can also do it manually.
> >
> > Select the portion of the formula (just a single cell reference or the entire
> > formula if you want) and hit the F4 key to cycle through all 4 options.
> >
> > lj wrote:
> >
> > > Hi, I'd like to know if there's a simple way to unlock or lock cells.
> > > I'm not sure if "Lock" is the correct term here. For example, if you
> > > have a formula that has C$14. Is there an easy way to unlock (remove
> > > the "$") from the formula or to ad it without manually doing it?
> > > Thanks for your help!
> >
> > > Lisa
> >
> > --
> >
> > Dave Peterson
 >> Stay informed about: Unlocking Cells 
Back to top
Login to vote
Dave Peterson

External


Since: Oct 17, 2008
Posts: 38



(Msg. 6) Posted: Mon Mar 23, 2009 5:30 pm
Post subject: Re: Unlocking Cells
Archived from groups: per prev. post (more info?)

Gord did nice work!

lisaj wrote:
>
<<snipped>>
>
> Thanks, this is perfect!!
 >> Stay informed about: Unlocking Cells 
Back to top
Login to vote
Paul Hyett

External


Since: Jan 6, 2009
Posts: 1



(Msg. 7) Posted: Tue Mar 24, 2009 5:25 am
Post subject: Re: Unlocking Cells
Archived from groups: per prev. post (more info?)

On Mon, 23 Mar 2009 at 13:08:16, lisaj wrote in
microsoft.public.excel :

>Thanks, this is helpful. What I'm trying to do is to change a whole
>group of cells from relative to absolute. Is there a way to highlight
>a whole group of cells and do that? How do I use a macro to do this?

Where possible, I use 'replace' to do this.
 >> Stay informed about: Unlocking Cells 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Adding up several cells - I'm sure this is really easy but I am getting into circular reference errors - I have two cells - one is a running total the other a user input figure that needs to be appended to the running total every time. so if the running total stands at 0, the....

Copy cells with value 0 as a list - Hi, I have a sheet with some cells with value 0 and others with data. I want a macro that copies all the cells with value <>0 in other sheet but as a list, one under the other. Is this possible? Thanks!

fill blank cells in a column - hello, how can i fill specific blank cells in a column. i tried find/replace without success. thanks

How to Past cells with formulas not using "$" without chan.. - Hello, I would like to copy / past a large amount of cells in which "$" has not been used in formules. Problem : referenced are changed (because "$" is not there). Example in A1 : "=B1+C1" if I copy A1 to A50 : the con...

Excel 2008 hanges when deleting cells or rows -
   Windows Help (Home) -> Microsoft Excel All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]