set <variable> to first column index of active cell
But this doesn't work. Thanks
One way:
set a to (get first column index of active cell)
"JE McGimpsey" wrote:
Outstanding! Thanks!
"JE McGimpsey" wrote:
> set a to (get first column index of active cell)
How can I get the same thing but for a row? Would this work?
set a to (get first row index of active cell)
Hmmm...
what happens when you try it?
I was trying to use the same concept to get the address information from a
cell divided into column and row information. Here's a snippit of my code
that I've put into a small script to debug. I've tried a whole bunch of
different things and trying to get the dialog to print either mycol2 or
myrow2's addresses fails...
tell application "Microsoft Excel"
activate object worksheet "Sheet1"
(* find first occurance of the word map and call this cell nextmap *)
set nextmap to (find (range "A:A" of worksheet "Sheet1") what "Map")
(*set myrow2 and mycol2 to values take from nextmap address*)
set myrow2 to (get address of row nextmap of Sheet1)
set mycol2 to (get first column index of cell nextmap of Sheet1)
display dialog "myrow2 is set to" & (get address myrow2)
end tell
"JE McGimpsey" wrote:
> .
>
(* find first occurance of the word map and call this cell nextmap *)
set nextmap to (find (range "A:A" of worksheet "Sheet1") what "Map")
get address nextmap
set mycol2 to first column index of nextmap
set myrow2 to first row index of nextmap