Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 79
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
next to impossible IF function incompetent[_2_] Excel Worksheet Functions 23 February 27th 08 06:40 PM
Impossible Splint Excel Discussion (Misc queries) 5 April 11th 06 10:55 PM
IMPOSSIBLE? AdrianCl Excel Worksheet Functions 2 February 15th 05 03:50 AM
Is this impossible? Chris Excel Worksheet Functions 1 February 10th 05 06:01 PM
The impossible? gb_S49 Excel Worksheet Functions 8 January 25th 05 06:29 PM


All times are GMT +1. The time now is 06:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"