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

col A col B col C col D col E Col G
1 7M
2 4E
3
4


In col G i have 7hours math,4 hour English ect. How to auto generate by fill
Ro 1 col A, B, C, D, E, WITH M M M M M and the balance 2M into Row 2
col A, B, and E E E in row 2 col C, D, E and Row 3 col A with E etc
as below
col A col B col C col D col E Col G
1 M M M M M 7M
2 M M E E E 4E
3 E
4







kk
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default school timetable

Sub Fill()

RowNum = 1
ColNum = 1
RowCount = 1
Count = 0
Do While (Range("G" & RowCount) < "") Or _
(Count 0)

If Count = 0 Then
Count = Val(Range("G" & RowCount))
Char = Range("G" & RowCount)
RowCount = RowCount + 1
End If
'remove digits for shr
Do While IsNumeric(Left(Char, 1))
Char = Mid(Char, 2)
Loop
Cells(RowNum, ColNum) = Char
ColNum = ColNum + 1
If ColNum 5 Then
ColNum = 1
RowNum = RowNum + 1
End If
Count = Count - 1
Loop
End Sub


"kkwong27" wrote:

col A col B col C col D col E Col G
1 7M
2 4E
3
4


In col G i have 7hours math,4 hour English ect. How to auto generate by fill
Ro 1 col A, B, C, D, E, WITH M M M M M and the balance 2M into Row 2
col A, B, and E E E in row 2 col C, D, E and Row 3 col A with E etc
as below
col A col B col C col D col E Col G
1 M M M M M 7M
2 M M E E E 4E
3 E
4







kk

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
Timetable Jake[_6_] Excel Discussion (Misc queries) 7 August 13th 11 05:17 PM
Timetable problem Albert.Harmse Excel Worksheet Functions 4 January 4th 10 11:19 PM
Is there a template for a personal timetable? horse lover Excel Worksheet Functions 2 February 10th 07 03:41 AM
weekly timetable template chris roberts Setting up and Configuration of Excel 1 September 1st 06 05:16 PM
Creating a timetable DSt Excel Discussion (Misc queries) 3 July 17th 06 11:44 AM


All times are GMT +1. The time now is 01:07 AM.

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"