Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Just creating the address string is probably the most efficient way (no
object references): strRangeAddress="A1:" & strcolid(lngCols) & cstr(lngRows) Function strColid(jColNo As Long) As Variant If jColNo 0 And jColNo <= 256 Then If jColNo < 27 Then strColid = Chr$(((jColNo - 1) Mod 26) + 65) Else strColid = Chr$(64 + Int((jColNo - 1) / 26)) & Chr$(((jColNo - 1) Mod 26) + 65) End If Else strColid = CVErr(xlErrNA) End If End Function regards Charles ______________________ Decision Models FastExcel Version 2 now available. www.DecisionModels.com/FxlV2WhatsNew.htm "rotor" wrote in message ... Hello: VBA in Excel XP with Win 2000. I have two variables that are both long data types. I need to somehow convert these into an equivalent range address that they would consume if starting at cell "A1". For example suppose: lngCols = 4 lngRows = 3 Range address would be: A1:D3 How in the world can I do this efficiently? Thanks in advance for your example function. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to create a range address with ADDRESS function? | Excel Worksheet Functions | |||
How do I transform numbers (different ranges) to text (diff. range | Excel Worksheet Functions | |||
How to efficiently declare variables | Excel Discussion (Misc queries) | |||
How to get 500 hyperlink address efficiently? | Excel Discussion (Misc queries) | |||
Efficiently transform variables into range address | Excel Programming |