Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default vB code to analyse list

Try this :-


Code
-------------------

Sub test()
Dim FromSheet As Worksheet
Dim ToSheet As Worksheet
Dim FromRow As Long
Dim Torow As Long
'-
Dim FromDate As Date
Dim ToDate As Date
Dim Days As Integer
'-------------------------
Set FromSheet = ActiveSheet
FromRow = 2
Set ToSheet = Worksheets("Detail")
Torow = 2
While FromSheet.Cells(FromRow, 1).Value < ""
FromDate = FromSheet.Cells(FromRow, 2).Value
Days = FromSheet.Cells(FromRow, 4).Value
For d = 0 To Days
ToSheet.Cells(Torow, 1).Value = _
FromSheet.Cells(FromRow, 1).Value
ToSheet.Cells(Torow, 2).Value = FromDate + d
ToSheet.Cells(Torow, 3).Value = _
FromSheet.Cells(FromRow, 5).Value
Torow = Torow + 1
Next
FromRow = FromRow + 1
Wend
MsgBox ("Done")
End Sub

-------------------


--
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
I need my formula to analyse numerical and text data Nightrunning Excel Discussion (Misc queries) 4 May 22nd 09 06:45 PM
Formula - Analyse range, return unique value S Davis Excel Worksheet Functions 4 February 20th 07 11:16 PM
how do you use a chisquare function to analyse data mada Excel Worksheet Functions 1 May 10th 06 02:03 PM
how do I analyse two spreadsheets for missing data? [email protected] Excel Discussion (Misc queries) 2 March 31st 06 03:18 PM
How do i analyse visible rows only in excel? Dr Happy Excel Worksheet Functions 8 December 6th 05 05:13 PM


All times are GMT +1. The time now is 11:09 PM.

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"