Thread: run-time error?
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
tandavina[_4_] tandavina[_4_] is offline
external usenet poster
 
Posts: 1
Default run-time error?


alright, i've a button for blocking of time slots in worksheet 2. and
i've to use 3 values from worksheet1 to match the 2 values in this
worksheet to do so, but one value of worksheet 2 are separated into 2
values in worksheet 1 and this value of worksheet 2 is not exact match
of these 2 values. eg. in worksheet 2, its ITDF04PROGRAM1EI01 and in
worksheet 1 values are P1 and EI. how do i get them to do a close match
instead of a exact match?

then there's the other value (time) which i put it as string. for
worksheet 1, the time is eg. 0800-0950 as for the time in worksheet 2,
it is sort of hourly, and separated into 2 rows for each hour, eg.
0800, 0850 / 0900, 0950 / 1000, 1050 and so on.

how do i go about doing it?
Please help. Thank you.


Private Sub CommandButton2_Click()

stud_grp = Sheets("StudGrp_BU").Range("B24:B62")
CS_prog = Sheets("05_S2").Range("D8:D35")
CS_dip = Sheets("05_S2").Range("E8:E35")
time_slots = Sheets("StudGrp_BU").Range("C6:CN7")
block = Sheets("StudGrp_BU").Range("C24:CN62")
CS_time = Sheets("05_S2").Range("C8:C35")

Do
block = 1
Exit Do
Loop While (stud_grp = CS_prog And CS_dip) And (time_slots =
CS_time)

End Sub


--
tandavina
------------------------------------------------------------------------
tandavina's Profile: http://www.excelforum.com/member.php...o&userid=30334
View this thread: http://www.excelforum.com/showthread...hreadid=500483