View Single Post
  #17   Report Post  
Posted to microsoft.public.excel.worksheet.functions
dolpandotcom via OfficeKB.com dolpandotcom via OfficeKB.com is offline
external usenet poster
 
Posts: 12
Default General Excel question

Hi Gord,

Happy Sunday. I am here again. I tried to use the calendar program in a
worksheet. I did change the cell where I will like to automate the calendar
as so that when one clicks on that cell, the calendar pop up for appropriate
date selection. It gave me an error "Run-time error, Object required. Is it
that it cannot work in excel2003 or I did not change a statement somewhere in
the program?

This is the program which I pasted but only changed the cell A1:A20 to A1
since that is the position where I want the calendar to pop up.

Private Sub Calendar1_Click()
ActiveCell.Value = CDbl(Calendar1.Value)
ActiveCell.NumberFormat = "mm/dd/yyyy"
ActiveCell.Select
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Not Application.Intersect(Range("A1"), Target) Is Nothing Then
Calendar1.Left = Target.Left + Target.Width - Calendar1.Width
Calendar1.Top = Target.Top + Target.Height
Calendar1.Visible = True
' select Today's date in the Calendar
Calendar1.Value = Date
ElseIf Calendar1.Visible Then Calendar1.Visible = False
End If
End Sub


Thanks and enjoy your Sunday.
Dolpan

Gord Dibben wrote:
I guess I misunderstood this statement................

Is there any other statement to add to the COUNT(C8:j8) to enable count two
or more items selected in a cell as one (1) please?


You have A1=2, B1=2,1 and C1=1

What do you want as a result in D1?

COUNT will give you 2 because it counts numbers only

COUNTA will give you 3 which seems to be what your starement above asks for.

Do you want to count B1 as two numbers giving you a return of 4 in D1?

Gord

I agree with your explanation Gord and also appreciate your explanations, but
take for an example if have a sheet with column label as A, B, C, D with one

[quoted text clipped - 30 lines]
Dolpandotcom
06/16/09


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200906/1