proc cellIndex w {

#	puts stderr "alpha index is $w"

       	if {[string first . $w] < 0} {
        	set c [cindex $w 0]
                set c [expr [ctype ord $c] - 64]
                set r [crange $w 1 end]
		set ind "$r,$c"
        } else {
                set wl [split $w .]
                lassign $wl first last
                set c1 [cindex $first 0]
                set c1 [expr [ctype ord $c1] - 64]
                set r1 [crange $first 1 end]
                set c2 [cindex $last 0]
                set c2 [expr [ctype ord $c2] - 64]
                set r2 [crange $last 1 end]
		set ind "$r1,$c1 $r2,$c2"
	}

#	puts stderr "returning $ind"

	return $ind
}

