Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default TOM you made my day...

Hi TOM,

Remember this Macro that you wrote to me, it worked great, I have t
make few modifications in this macro. As this macros asks for tw
inputs and highlight the required range area, I also would like to se
an auto generated number list from 1 to any number (depending on th
2nd input) in Column A, exactly next to Date cell, i.e., if the firs
date that I entered as an input was 01-May-2003 and was stored in cel
B26 and the second date (ending date) was 10-may-2003 and was stored i
Cell B35, now the total rows involved between these two dates are 10
now what I need is a counting from One to Ten but the counting mus
start in column A26 which should be adjacent to forst input cell i.e.
A26 and the last number of counting should be next to the end dat
i.e., A35. This list generating procedure must be dependent on firs
date input and second date input.



RESULT DATE COLUMN
Column A ColumnB
1 01-May-03
2 02-May-03
3 03-May-03
4 04-May-03
5 05-May-03
6 06-May-03
7 07-May-03
8 08-May-03
9 09-May-03
10 10-May-03


Regards,

DARNO



Sub AAtester10()
Dim sStart As String, sEnd As String
Dim res As Variant, res1 As Variant
Dim rng As Range
sStart = InputBox("Enter Start Date")
sEnd = InputBox("Enter End Date")

If IsDate(sStart) And IsDate(sEnd) Then
res = Application.Match(CLng(CDate(sStart)), Range("B1:B800"), 0)
res1 = Application.Match(CLng(CDate(sEnd)), Range("B1:B800"), 0)
If Not IsError(res) And Not IsError(res1) Then
Set rng = Range(Range("B1:B800")(res), Range("B1:B800")(res1))
rng.Resize(, 31).BorderAround Weight:=xlMedium, ColorIndex:=3
End If
End If
End Su

--
Message posted from http://www.ExcelForum.com

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
Save changes? even when you've made none Donna Excel Discussion (Misc queries) 3 November 20th 08 10:17 PM
save changes when no changes made Elaine Excel Discussion (Misc queries) 2 January 19th 06 12:55 AM
postings not being made bj Excel Discussion (Misc queries) 4 June 17th 05 02:11 PM
TOM you made my day... darno[_5_] Excel Programming 4 February 18th 04 04:10 AM
Help finding changes made Jean[_4_] Excel Programming 0 January 21st 04 04:08 PM


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