#1   Report Post  
tom300181
 
Posts: n/a
Default Automated Archiving


I have a sheet that has a variable cell (date b1) and an entry for Sales
(B3). I also have A6 - AE6 with numbers 1-31,

I want a formula that will look at B1 and add the contents of B3 to to
A7-AE7 under the date from B1.

Can this be done?

Thanks

Tom


--
tom300181
------------------------------------------------------------------------
tom300181's Profile: http://www.excelforum.com/member.php...o&userid=21580
View this thread: http://www.excelforum.com/showthread...hreadid=391750

  #2   Report Post  
tom300181
 
Posts: n/a
Default


I have a macro that looks like this........ It doesn't currently work
(I am very poor on VB!) this is the code up to 3rd day of the month.
Obviously I would have to duplicate this for the rest of the date
range. Can anybody help me out with how to get this to work
?
Thanks

Tom


Sub test()
'
' test Macro
' Macro recorded 01/08/2005 by bailete
'

'
Range("B3:B4").Select
Selection.Copy
one
End Sub

Sub one()

If ("B1") = "1" Then

Range("A7").Select
ActiveSheet.Paste

Else: two


End If
End Sub



Sub two()
If ("B1") = "2" Then

Range("B7").Select
ActiveSheet.Paste

Else: three


End If
End Sub

Sub three()
If ("B1") = "3" Then

Range("C7").Select
ActiveSheet.Paste

Else: End


End If
End Sub


--
tom300181
------------------------------------------------------------------------
tom300181's Profile: http://www.excelforum.com/member.php...o&userid=21580
View this thread: http://www.excelforum.com/showthread...hreadid=391750

  #3   Report Post  
tom300181
 
Posts: n/a
Default


Can anybody be of assistance????

Thanks

Tom


--
tom300181
------------------------------------------------------------------------
tom300181's Profile: http://www.excelforum.com/member.php...o&userid=21580
View this thread: http://www.excelforum.com/showthread...hreadid=391750

  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default

Does B1 contain a real date or does it contain a number from 1 to 31?

Maybe something like this will get you started.

Option Explicit
Sub testme01()


Dim DestCell As Range
Dim myValue As Double
Dim DayValue As Variant
Dim myMsg As String

With Worksheets("sheet1")
Set DestCell = .Range("a6")
myValue = .Range("B3").Value
DayValue = .Range("B1").Value

' or
' If IsDate(DayValue) Then
' DayValue = Day(DayValue)
' End If

myMsg = "Invalid Value"
If IsNumeric(DayValue) Then
DayValue = CLng(DayValue)
If DayValue < 1 _
Or DayValue 31 Then
'do nothing
Else
myMsg = ""
End If
End If

If myMsg < "" Then
MsgBox myMsg
Exit Sub
End If

DestCell.Offset(1, DayValue - 1).Value = myValue
End With

End Sub









tom300181 wrote:

I have a sheet that has a variable cell (date b1) and an entry for Sales
(B3). I also have A6 - AE6 with numbers 1-31,

I want a formula that will look at B1 and add the contents of B3 to to
A7-AE7 under the date from B1.

Can this be done?

Thanks

Tom

--
tom300181
------------------------------------------------------------------------
tom300181's Profile: http://www.excelforum.com/member.php...o&userid=21580
View this thread: http://www.excelforum.com/showthread...hreadid=391750


--

Dave Peterson
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
how to disable save prompt on closing excel file in automated mode [email protected] Excel Discussion (Misc queries) 3 July 6th 05 10:35 PM
Excel should let me create an automated list of the name box marisa Excel Discussion (Misc queries) 2 July 5th 05 10:22 PM
Division by zero in automated subtotals Neil Berkowitz Excel Discussion (Misc queries) 1 June 30th 05 01:20 AM
help! making a worksheet more automated? redb Excel Discussion (Misc queries) 2 April 15th 05 01:53 PM
3 questions about automated c++ com add-in worksheet functions gert Excel Worksheet Functions 0 March 10th 05 09:57 AM


All times are GMT +1. The time now is 09:09 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"