Thread: Help with Macro
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Simon S[_2_] Simon S[_2_] is offline
external usenet poster
 
Posts: 8
Default Help with Macro

Rick, Great help, thanks

"Rick Rothstein" wrote:

This single statement will toggle between the two settings...

Application.ReferenceStyle = (xlR1C1 + xlA1) - Application.ReferenceStyle

--
Rick (MVP - Excel)


"Simon S" wrote in message
...
Hi,

I am new to macros and I need some help

I regularly have to change the reference style from x1A1 to x1R1C1 and
back
again. So I made the following macro using Ctrl+Shift+T as the keyboard
short cut

Application.ReferenceStyle = xlR1C1
End Sub

Is there a way I can get it to toggle, i.e. each time I press Ctrl+Shift+T
it will change to other reference style, if I am in x1A1 it will change to
x1R1C1 and vice versa

Thanks