Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
J_J,
You have run out of columns. RngCell is column C, so lngCol cannot exceed 254... RngCell(1, 1) is Column 3 RngCell(1, 254) is Column 256 You might try something like this... If i < 10 Or j < 10 Or k < 20 Or l < 10 Or m < 10 Or n < 10 Then lngCol = lngCol + 1 If lngCol < 255 Then GoTo StartOver End If End If Regards, Jim Cone San Francisco, USA "J_J" wrote in message ... Hi Tom, I wish that would have been the reason. But it ain't. I typed it wrongly when I was typing the follow-up question here. On the file "lngcol" is typed with an "L" not an "I". I am stuck. I am uploding the file to my website with the name "distribute.xls" Here is the link: http://www.eserceker.com/xls/distribute.xls I' ll be more then happy if you or any expert interested here will give it a try. Sorry for the non-english language used in the file. But it is straight forward. Only one button available on Sheet1 to execute all macros... Sincerely J_J "Tom Ogilvy" wrote in message ... Near as I can tell the problem is you misspelled lngcol by using an "I" instead of an "L" Select Case rngCell(1, IngCol).Value however, even if IngCol has a value of 0, it shouldn't raise an error: set rngCell = Range("C10") ? rngCell(1,0).Address $B$10 Regards, Tom Ogilvy "J_J" wrote in message ... Sorry for my mistake: Column A is used for marking with "X" thus The names are in column B, exam points in C, and 1st, 2nd and 3th coices are in columns D, E, F respectively. J_J |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Increasing number of rows beyond 65K | Setting up and Configuration of Excel | |||
Automatically increasing a number by 1 | Excel Discussion (Misc queries) | |||
Increasing Number | Excel Discussion (Misc queries) | |||
Increasing number of columns beyond IV | Excel Worksheet Functions | |||
How do I always insert last cell from a increasing array ? | Excel Worksheet Functions |