Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
CurrentRegion.Address
Hello guys, a difficult queston, in my opinion:
I'm using Excel VBA to retrieve informations from an Access Database. As SQL's results are variable, I need to use a loop to increment data and generate a list. ActiveCell.CurrentRegion.Address is the command that returns me something like "$G$5" (if one cell unmerged is selected) or "$A$2:$B$2" (if it's a range or more than one single cell). Basically, after opening and editing document, all these references get lost. When I select (using still VBA) one range to use function "COUNTIF()", excel missunderstands these ranges and my sums goes wrong between circular references and others columns or rows. For List generation, I'm using a for loop to increment Cells(i,j).Value. I've created a small macro to indicate me what is the range that I'm working. Unfortunately, when I select a cell (that is not merged), it returns me something like "$A$25:$K$31". What should I do? I really appreciatte your help. Thanks, |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
currentregion | Excel Discussion (Misc queries) | |||
CurrentRegion less one Row | Excel Programming | |||
UsedRange and CurrentRegion | Excel Programming | |||
CurrentRegion | Excel Programming |