LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Referring to a cell(Newbie)


Gary Keramidas wrote:
i'm not sure what you're looking for.
do you want a sum formula in E4?

Sub test()
Range("e4").Formula = "= sum(c10:c1)"
End Sub



Not exactly...I have 2 collums B and C. I have the date on B and the
amont of items made in collum C. So everyday i type my initials in
collum A and the date automaticly pops up in collum B. And then I type
in collum C how many items i have made that given day. But at the end
of the month i don't what cell in collum B i'll end up in. I want to
know how i can find out which cell it is, cause I need to sum the cell
next to which is C?? Basicly I want to sum the amount of items i have
made that month...which vary.

I am so bad at explaining this! Partly because I don't Excel or VBA
very well :(



Public Sub Worksheet_Change(ByVal Target As excel.Range)

On Error GoTo ErrorHandler

Dim dato As Date
Dim DatoAug As Date, DatoSept As Date, DatoOkt As Date, DatoNov As
Date, DatoDec As Date



dato = Format(Now, "mm-dd-yy")
DatoAug = Format("08-31-2006")
DatoSept = Format("09-30-2006")
DatoOkt = Format("10-31-2006")
DatoNov = Format("11-30-2006")
DatoDec = Format("12-31-2006")




With Target
If .Count 1 Then Exit Sub
If .Column < 1 Then Exit Sub

Application.EnableEvents = False
.Offset(0, 1).Value = Format(Now, "mm-dd-yy")
Application.EnableEvents = True

End With


If dato = DatoAug Then


[E4].Value = Application.Sum([???:C1])

At the end of the month I would like to sum collum C so I get the
amount of items for that given month. In clolum B I have the date.



 
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
Referring a cell Terry0928 via OfficeKB.com Excel Discussion (Misc queries) 3 May 21st 10 09:22 AM
Referring to first cell in a range FARAZ QURESHI Excel Discussion (Misc queries) 5 December 26th 07 05:14 PM
Sum values referring to a cell with same value ghnogueira Excel Discussion (Misc queries) 3 March 23rd 07 09:11 PM
referring to a cell containing a file name [email protected] Excel Discussion (Misc queries) 2 December 4th 06 05:03 PM
Referring to a cell in another sheet Mike D. Excel Programming 2 April 5th 05 02:49 AM


All times are GMT +1. The time now is 04:13 PM.

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

About Us

"It's about Microsoft Excel"