Visual Basic para Aplicaciones - EXCEL Y VISUAL

Life is soft - evento anual de software empresarial
 
Vista:

EXCEL Y VISUAL

Publicado por MOISES (11 intervenciones) el 03/10/2005 16:08:52
NECESITO AYUDA CON ESTO:

NECESITO IMPLEMENTAR UN CICLO QUE LEA EL VALOR DE LA CELDA DESDE LA A21 HASTA LA A65536, QUE CUANDO EL VALOR DE LA CELDA SEA = "CREDITO" HACER LO PRIMRO


formato = Cells(fila_formatos, COLUMNA)
If Len(formato) > 0 Then
tema = Right(Space(Cells(fila_largos, COLUMNA)) + Format(Cells(fila, COLUMNA), formato), Cells(fila_largos, COLUMNA))
Else
tema = Left(LTrim(RTrim(Cells(fila, COLUMNA))) + Space(Cells(fila_largos, COLUMNA)), Cells(fila_largos, COLUMNA))
End If

SINO HACER ESTO

formato = Cells(fila_formatos1, COLUMNA)
If Len(formato) > 0 Then
tema = Right(Space(Cells(fila_largos1, COLUMNA)) + Format(Cells(fila, COLUMNA), formato), Cells(fila_largos1, COLUMNA))
Else
tema = Left(LTrim(RTrim(Cells(fila, COLUMNA))) + Space(Cells(fila_largos1, COLUMNA)), Cells(fila_largos1, COLUMNA))
End If
FIN.........

ES URGENTE: GRACIAS POR SU COLABORACION
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:EXCEL Y VISUAL

Publicado por GUstavo (11 intervenciones) el 03/10/2005 16:54:40
Hola Colega
sabes usar la sentencia "FOR....NEXT"
iniciamos una veriable tipo entera desde el numero de celda q quieres y termina donde quieras OK

For I = 21 to 65536
If Range("A" & I) = "CREDITO " then
HACER LO PRIMRO
Else
SINO HACER ESTO
End If
Next I
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar