Thread: Get_Cell_Number
View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
isabelle isabelle is offline
external usenet poster
 
Posts: 587
Default Get_Cell_Number

for a better understanding of this macro, i changed "rws" to "clms"

Sub Macro1()
n = 32769 ' xl2007 + -- 16384(XFD1) 32768(XFD2)
clms = Columns.Count
If n < clms Then
rw = 1
clm = n
Else
If n Mod clms = 0 Then
rw = Int(n / clms)
clm = Columns.Count
Else:
rw = Int(n / clms) + 1
clm = n Mod clms
End If
End If
MsgBox Cells(rw, clm).Address()
End Sub


isabelle