|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
ok im out of ideas here so i need some help in some coding here.... i have an excel worksheet database that look like this
2 3 4 5 6 7 8 y y y y ok so in the display sheet, i want it to be displayed so that one column can only take 5 data and if there is extra than it should be displayed in the next column. Like the data above, it still can be displayed in one column coz there r only 4 numbers with y but if there r extra, how to do?? Thanx a lot for helping me.... ![]() |
|
#2
|
|||
|
|||
|
coding
what ive done so far is like below
For i = 3 To 500 If LCase(Sheet2.Cells(i, 2)) = program Then Sheet1.Cells(20, 2) = UCase(program) j = 4 For l = 4 To 20 If Sheet2.Cells(i, l) = "Y" Then Sheet1.Cells(j + 17, 4) = Sheet2.Cells(2, l) j = j + 1 End If Next l Exit Sub End If Next i MsgBox "Invalid" End Sub |
|
#3
|
|||
|
|||
|
any chance you could attach a sample worksheet?
|
|
#4
|
|||
|
|||
|
solved
its ok ive solved it...thanx
|
|
#5
|
|||
|
|||
|
Hi,
Just because you asked nicely I will throw you a bone. I am assuming that you have properly declared and initialized your excell objects through the right references (Preferebly a library not younger that version 8). Since I trust that you did I will then move on and dispense with the blunt hummor. You need to manipulate the thing from the inside. You cannot rely on Excel to do the rest for you, you need to construct a routine that will interpret waht it sees on the last row on your database, then make decisions as to what needs to be done. Now any self-respecring developer will know a few routines to detect if a cell (and ultimately a row) has any contetns at all. This must be done through a loop that will not end up overloading your Page File thus crashing your machine since Excel is too fragile to be kept in the bin that long if you know what I mean. When this routine has done this, you should then have it see (through th euse of flags) whether it should proceed to use the current row or move on to the next one. You problem I may invisige is that you can't figure out how to get it to work indeffinetely alongside the user without doing crap. You will find a solution to this problem by getting over the idea that you need to solve all the problem at one fell swoop. Section the problem, even inside the subroutine itself. Goodluck, glad to see females doing programming. I wish more got into the habbit. Aks again, maybe then i can give you code samples instead of now when I am away from my personal work station. |
|
#6
|
|||
|
|||
|
I am trying 2 get the code 4 name tags ice tried directx4Vb didnt work please will some1 help me thanx u
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > Excel VB help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|