Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
impossible syntax??
Good Day,
Is the following approach a dead end? Must the range be in the format ("A1:A2") to make this code work? t = Application.WorksheetFunction.CountA(Sheets("tele" ).Range(Cells(ActiveCell.R ow, ActiveCell.Column + 79), Cells(ActiveCell.Row + 6, ActiveCell.Column + 79))) Thanks for any help. Brgds CG Rosén |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
impossible syntax??
I would use something like this instead:
Dim Target as range Set Target = Sheets("tele").ActiveCell.Resize(6, 79) t=Application.WorksheetFunction. CountA (Target) Best - RADO "CG Rosén" wrote in message ... Good Day, Is the following approach a dead end? Must the range be in the format ("A1:A2") to make this code work? t = Application.WorksheetFunction.CountA(Sheets("tele" ).Range(Cells(ActiveCell.R ow, ActiveCell.Column + 79), Cells(ActiveCell.Row + 6, ActiveCell.Column + 79))) Thanks for any help. Brgds CG Rosén |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
impossible syntax??
Dim Target as range
Set Target = Sheets("tele").Range( _ ActiveCell.offset(0,79).Resize(6, 1).Address(0,0)) t=Application.WorksheetFunction.CountA(Target) might be closer to what the original code shows. A worksheet does not have an activeCell property The code is inconclusive on whether Tele is the active sheet The cells references both add 79 to the activecell column value, so the column width is 1, not 79 and is thus offset from the activecell -- Regards, Tom Ogilvy RADO wrote in message ... I would use something like this instead: Dim Target as range Set Target = Sheets("tele").ActiveCell.Resize(6, 79) t=Application.WorksheetFunction. CountA (Target) Best - RADO "CG Rosén" wrote in message ... Good Day, Is the following approach a dead end? Must the range be in the format ("A1:A2") to make this code work? t = Application.WorksheetFunction.CountA(Sheets("tele" ).Range(Cells(ActiveCell.R ow, ActiveCell.Column + 79), Cells(ActiveCell.Row + 6, ActiveCell.Column + 79))) Thanks for any help. Brgds CG Rosén |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
impossible syntax??
Hi,
Thanks RADO and Tom Ogilvy for your answers, always a pleasure to learn something new. Brgds CG Rosén |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
next to impossible | Excel Worksheet Functions | |||
Impossible | Excel Discussion (Misc queries) | |||
IMPOSSIBLE? | Excel Worksheet Functions | |||
Is this impossible? | Excel Worksheet Functions | |||
The impossible? | Excel Worksheet Functions |