# Thread: skip in blank cell inseted column... (2000 sr 1)

1. ## skip in blank cell inseted column... (2000 sr 1)

I have this piece of code and with a for next cicle...

For Y = 9 To 23

TEST = Trim(Sess0.SCREEN.GETSTRING(Y, 66, 10))

If TEST = "IN ESSERE" Then

NUM_CARTA = Trim(Sess0.SCREEN.GETSTRING(Y, 7, 12))
NOME_CARTA = Trim(Sess0.SCREEN.GETSTRING(Y, 55, 11))

Sheets("TOTALE").Range("P" + RIGA_C) = NOME_CARTA & " - " & NUM_CARTA

End If
Next Y

My problem:

is possible the test If TEST = "IN ESSERE" is true many time during the cilcle for next.

For example when Y = 10, or Y =14, ecc....

now assuming the line is filled with Y=10

Sheets("TOTALE").Range("P" + RIGA_C) = NOME_CARTA & " - " & NUM_CARTA

and when the is filled Y=14

Sheets("TOTALE").Range("Q" + RIGA_C) = NOME_CARTA & " - " & NUM_CARTA

if effect skip on the right cell free if the first is already filled

hope have understand me.....

2. ## Re: skip in blank cell inseted column... (2000 sr 1)

Dim Colonna As Long
Colonna = 16 ' corresponds to column P

For Y = 9 To 23
TEST = Trim(Sess0.SCREEN.GETSTRING(Y, 66, 10))
If TEST = "IN ESSERE" Then
NUM_CARTA = Trim(Sess0.SCREEN.GETSTRING(Y, 7, 12))
NOME_CARTA = Trim(Sess0.SCREEN.GETSTRING(Y, 55, 11))
Sheets("TOTALE").Cells(RIGA_C, Colonna) = NOME_CARTA & " - " & NUM_CARTA
' Increment Colonna for the next one
Colonna = Colonna + 1

End If
Next Y

3. ## Re: skip in blank cell inseted column... (2000 sr 1)

.... Hans i read this forum about 2 or 3 years, but how can you understand my english?
WORK PERFECT!

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•