Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inserting Dates
Hi I am lookinf for some help with coding this.
if cell a1 is a date then if cell a2 is a date then if a2-a1 = 1 then rw=rw+1 else insert (a2-a1) rows rowadd=1 for each row inserted do (a2-a1)rows = a1+rowadd rowadd=rowadd+1 loop rw=rw+1 endif else rw=rw+1 endif rw=rw+1 endif anybody have any thoughts on how to help me do this? Thanks. --------------= Posted using GrabIt =---------------- ------= Binary Usenet downloading made easy =--------- -= Get GrabIt for free from http://www.shemes.com/ =- |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inserting Dates
Assuming the dates start in A1 as in your example:
Sub AddDates() Dim i As Long i = 1 Do While Cells(i + 1, 1) < "" If Int(Cells(i + 1, 1)) Int(Cells(i, 1)) + 1 Then Rows(i + 1).EntireRow.Insert Cells(i + 1, 1) = Int(Cells(i, 1)) + 1 End If i = i + 1 Loop End Sub -- Regards, Tom Ogilvy "shhhhh" wrote in message ... Hi I am lookinf for some help with coding this. if cell a1 is a date then if cell a2 is a date then if a2-a1 = 1 then rw=rw+1 else insert (a2-a1) rows rowadd=1 for each row inserted do (a2-a1)rows = a1+rowadd rowadd=rowadd+1 loop rw=rw+1 endif else rw=rw+1 endif rw=rw+1 endif anybody have any thoughts on how to help me do this? Thanks. --------------= Posted using GrabIt =---------------- ------= Binary Usenet downloading made easy =--------- -= Get GrabIt for free from http://www.shemes.com/ =- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Inserting dates function | Excel Worksheet Functions | |||
Inserting Dates without years, please help!! | Excel Discussion (Misc queries) | |||
Inserting Dates | Excel Discussion (Misc queries) | |||
Inserting dates | Excel Discussion (Misc queries) | |||
Inserting Dates | Excel Discussion (Misc queries) |