LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Can any body help?

Hi,

Following Macro was written to me by TOM, 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
ColumnA 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

 
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
Emaling(as body) Moses Excel Discussion (Misc queries) 1 April 7th 10 10:07 PM
tab name in the body of a worksheet - &[TAB]? HR Duvall Excel Discussion (Misc queries) 5 February 15th 08 02:49 AM
Please any body help me.i need help as soon as possible [email protected] Excel Discussion (Misc queries) 0 June 20th 07 07:55 AM
Any body help me out with this? wwwrabbit Excel Discussion (Misc queries) 3 June 15th 06 08:46 PM
Mail as body Balu Excel Discussion (Misc queries) 1 May 30th 06 04:17 PM


All times are GMT +1. The time now is 09:33 AM.

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"