Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Oops. Missed that part. There are lots of ways. I like to set a range
variable to the range and let excel worry about the syntax (in the cell itself): Option Explicit Sub testme() Dim y As Long Dim x As Long Dim myRng As Range x = 1 y = 1 Set myRng = Sheet9.Columns(x) Sheet10.Cells(y, x) = "=COUNTIF(" & myRng.Address(external:=True) _ & ",CHAR(" & 64 + y & "))" End Sub Then I don't have to worry about someone changing the name of the worksheet, too! (Not many know how to modify the codename (sheet10). But lots could change that worksheet name in the tab (sheet9). "paku <" wrote: thanks, dave but how about the $A:$A? can it be replaced with variable x? i want it to count every occurence in WHOLE column of x e.g.Sheet10.Cells(y, x) = "=COUNTIF(sheet9!$A:$A,CHAR(" & 64 + y & "))" thanks! dido --- Message posted from http://www.ExcelForum.com/ -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
excel formula syntax | Excel Worksheet Functions | |||
vba syntax for excel object | Excel Discussion (Misc queries) | |||
syntax for countif when cells fall within a numerical range | Excel Worksheet Functions | |||
What is the syntax for the IF formula in Excel? | Excel Worksheet Functions | |||
Excel Rank syntax | Excel Worksheet Functions |