Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Programming dates

I have a weekending (Saturday) date in cell G5 programmed as follows:

TheDate = Format(Now + 7 - Weekday(Now), "mm/dd/yy")

The cells in rows B10 through B16 hold numerical data, and correspond to
days of the week (Sunday through Saturday). I need to check for a number 0
in each cell in the above range, and use the above date to insert both the
date and numerical data elsewhere in the workbook (see pseudocode below).

For Range("B10:B16").Cells
If range("B10").Value 0 Then
NewDate = range("G5").value - 6 days(Sunday) (need a way to program
this line)
Worksheets("Sheet2").Range("A3").End(xlUp).Offset( 1,0).Value = NewDate
Worksheets("Sheet2").Range("B3").End(xlUp).Offset( 1,0).Value =
Range("B10").Value
End If
Next

I hope you can understand what I'm trying to do from the above. I can't seem
to find a way to program the date for each day, and when I try to transfer
the data to a new worksheet, I get 1 date from the first number, 2 dates
from the second number, 3 dates from the third, and on and on. Please help!

TB


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
Programming dim Excel Discussion (Misc queries) 7 November 16th 07 11:56 AM
vba programming biker man Excel Discussion (Misc queries) 1 August 28th 07 04:02 PM
programming help Stan Excel Discussion (Misc queries) 2 April 23rd 07 02:44 PM
CD Programming nelson Excel Discussion (Misc queries) 0 June 4th 06 04:32 PM
programming ernie Excel Discussion (Misc queries) 4 March 13th 06 02:06 PM


All times are GMT +1. The time now is 07:28 PM.

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"