Recherche Astuces Seek Astuces

G

Guest

Mes Dames Messieurs Bonjour
Je voudrais savoir comment faire pour recopier une ligne complète et non le
tableau d'un tableau Excel vers un autre tableau suivant la valeur ou l'indication
contenu dans une cellule de cette ligne.
Question traduite avec WORD et je ne comprends que le Français.
Merci de votre compréhension.
Merci d'avance.
LA FRONDE
My Ladies Sirs Hello
I would like to know how to make to recopy a complete line and not the table
of a table Excel towards another table according to the value or the
indication contained in a cell of this line.
Question translated with WORD and I include/understand only the French.
Thank you for your comprehension.
Thank you in advance.
THE SLING
 
B

Bob Phillips

It think this is what you want. It will need changing to your actual sheets,
column letters and so on

Public Sub ProcessData()
Dim i As Long
Dim LastRow As Long
Dim NextRow As Long
Dim sh As Worksheet

With Application

.ScreenUpdating = False
.Calculation = xlCalculationManual
End With

Set sh = Worksheets("the other sheet")
With sh

NextRow = .Cells(.Rows.Count, "A").End(xlUp).Row + 1
End With

With ActiveSheet

LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
For i = 1 To LastRow

If .cell(i, "H") = "some value" Then

.Rows(i).Copy sh.Cells(NextRow, "A")
NextRow = NextRow + 1
End If
Next i
End With

With Application

.Calculation = xlCalculationAutomatic
.ScreenUpdating = True
End With

End Sub


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
G

Guest

I am to afflict I did not include/understand your answer.

Thank you for your kindness.
 
B

Bob Phillips

Thierry,

What is it that you do not understand in particular?

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
B

Bob Phillips

And I thought I had impeccable European credentials <bg>

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
M

Mick et Pauley

Bonsour® Thierry BUTEZ avec ferveur ;o))) vous nous disiez :
Mes Dames Messieurs Bonjour
je ne comprends que le Français.
Merci de votre compréhension.

you'd better click here :
news://news.microsoft.com/microsoft.public.fr.excel
et poser clairement ta question là ...
;o)))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top