How can I transfer a required data from sheet 1 to sheet 2 automat

G

Guest

How can I transfer a required / certain data from sheet one to another sheet
two automatically in a same file

example

SHEET ONE

A B C D E F …………………….
1 4550 1000 APRIL 15000 4550 PANDING
2 8550 2000 DEC 1000 2000
3 6750 5555 JAN 6000 111 PANDING
4 4550 1000 APRIL 15000 4550 PANDING
5 8550 2000 DEC 1000 2000
6 6750 5555 JAN 6000 111 PANDING
..
..
..
..

I want to shift only that line which F column is reflecting = Panding.

Like result on sheet two in following condition
A B C D E F …………………….
1 4550 1000 APRIL 15000 4550 PANDING
3 6750 5555 JAN 6000 111 PANDING
4 4550 1000 APRIL 15000 4550 PANDING
6 6750 5555 JAN 6000 111 PANDING
..
..
..
..

quick response will be highly appreciated.

Regards
Malik Nadeem
Karachi - Pakistan
cell # 0092 300 2556512
 
G

Guest

Try this code

Sub movedata()

Sh2RowCount = 1
With Sheets("Sheet1")
LastRow = .Cells(Rows.Count, "A").End(xlUp).Row
Set ReflectRange = .Range("F1:F" & LastRow)

For Each cell In ReflectRange
If cell.Value = "PANDING" Then
.Rows(cell.Row).Copy _
Destination:=Sheets("Sheet2"). _
Rows(Sh2RowCount)
Sh2RowCount = Sh2RowCount + 1
End If
Next cell
End With

End Sub
 
G

Guest

thanks for your reply sorry for being late in my response
shall i use this through VB in excel?

also please advise is there any other option like following formula.
=INDEX(Sheet1!$A$2:$IV$4000, ???????????)

thanks for your continued support/help

regards
Malik Nadeem
 
G

Guest

worksheet functions cannot move data. Worksheet functions can only get data
from other locations. The code I gave you is a VBA macro.
 
G

Guest

dear Joel,

thank you for your prompt response. my knowledeg of VBA macro is very
limited. can you sent me an email address where i can forward my file which
will clearify my requirments

for example i would like to copy only that data from sheet one to sheet 3
which does not have any value in "pending" colum.

thanks in advance for your great support in help.

Regards
Malik Nadeem
 

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