Data from two sheets make up real time list in the new sheet??

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Dear all and JBM

I posted my problem two days ago, but I didn't have chance to check the
answer until now. In the mean while the topic is already on the 3-4 page.
Therefore I copied it once again at the end of this post. JBM answered me,
but this is not exactly what I need. First of all, I would need to copy data
in order to put it in the new sheet and I would like to have a “real timeâ€
update over the situation from the two processes; in case that an order is
delayed or the sequence is altered.

Secondly, I would like to combine it with the data from second sheet
(“Process 2â€, please see below) into a list.

I'm not very experienced Excel user, so I have no idea what this would
require. Please ask more question if my explanation below is not clear and I
will try to be more often online.

Cheers
Vedad


:
One way is to use Excel's Autofilter (Data/Filter/Autofilter). Filter the
Finish Good column for "YES". Then copy the filtered list to a new sheet.
 
try:

Sub tst()

Dim t, r, nbr, mySets(100, 100) As Variant

nbr = 0
Sheets("Sheet1").Select
r = Range("A65500").End(xlUp).Row
For t = 1 To r
If Cells(t, 3) = "YES" Then
nbr = nbr + 1
mySets(nbr, 1) = Cells(t, 1)
mySets(nbr, 2) = Cells(t, 2)
mySets(nbr, 3) = Cells(t, 3)
mySets(nbr, 4) = Cells(t, 4)
End If
Next

Sheets("Sheet2").Select
r = Range("A65500").End(xlUp).Row
For t = 1 To r
If Cells(t, 3) = "YES" Then
nbr = nbr + 1
mySets(nbr, 1) = Cells(t, 1)
mySets(nbr, 2) = Cells(t, 2)
mySets(nbr, 3) = Cells(t, 3)
mySets(nbr, 4) = Cells(t, 4)
End If
Next

Sheets("Sheet3").Select
For t = 1 To nbr
Cells(t, 1) = mySets(t, 1)
Cells(t, 2) = mySets(t, 2)
Cells(t, 3) = mySets(t, 3)
Cells(t, 4) = mySets(t, 4)
Next

r = Range("A65500").End(xlUp).Row
Range("A1:D" & r).Select
Selection.Sort Key1:=Range("D1"), Order1:=xlAscending, Key2:=Range("B1") _
, Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:= _
False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal,
DataOption2 _
:=xlSortNormal
Range("A1").Select

End Sub
 
try:

Sub tst()

Dim t, r, nbr, mySets(100, 100) As Variant

nbr = 0
Sheets("Sheet1").Select
r = Range("A65500").End(xlUp).Row
For t = 1 To r
If Cells(t, 3) = "YES" Then
nbr = nbr + 1
mySets(nbr, 1) = Cells(t, 1)
mySets(nbr, 2) = Cells(t, 2)
mySets(nbr, 3) = Cells(t, 3)
mySets(nbr, 4) = Cells(t, 4)
End If
Next

Sheets("Sheet2").Select
r = Range("A65500").End(xlUp).Row
For t = 1 To r
If Cells(t, 3) = "YES" Then
nbr = nbr + 1
mySets(nbr, 1) = Cells(t, 1)
mySets(nbr, 2) = Cells(t, 2)
mySets(nbr, 3) = Cells(t, 3)
mySets(nbr, 4) = Cells(t, 4)
End If
Next

Sheets("Sheet3").Select
For t = 1 To nbr
Cells(t, 1) = mySets(t, 1)
Cells(t, 2) = mySets(t, 2)
Cells(t, 3) = mySets(t, 3)
Cells(t, 4) = mySets(t, 4)
Next

r = Range("A65500").End(xlUp).Row
Range("A1:D" & r).Select
Selection.Sort Key1:=Range("D1"), Order1:=xlAscending, Key2:=Range("B1") _
, Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:= _
False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal,
DataOption2 _
:=xlSortNormal
Range("A1").Select

End Sub
 
Thank you for quick answer. Looks like something that might work. The only
problem is that I'm not very familiar with programming in VB.

Could you give me some tips what I need to read about in order to solve this
problem; and what are parameters I need to change in your proposal?

Thanks once again.
--
Vedad



"excelent" skrev:
 
Thank you for quick answer. Looks like something that might work. The only
problem is that I'm not very familiar with programming in VB.

Could you give me some tips what I need to read about in order to solve this
problem; and what are parameters I need to change in your proposal?

Thanks once again.
--
Vedad



"excelent" skrev:
 
Anybody?

A tip what and where I should start looking at would be appriciated.

Thanx
Vedad
 
Anybody?

A tip what and where I should start looking at would be appriciated.

Thanx
Vedad
 
hi vedad
ok back from work :-)

do u mean help to put kode in a module and use or...?
 
hi vedad
ok back from work :-)

do u mean help to put kode in a module and use or...?
 
Hi excelent

I'm a new bee (total idiot) in VBA programming. Until now I just used some
easy formulas in Excel sheets, but I have an ambition about learning more
about VBA and more advanced functions in Excel.

Since I'm so inexperienced, I was not sure where to start (and I was hoping
that it can be solved easily with some embedded Excel functions) Therefore, I
presented the whole problem hoping that somebody will help me at least in
which direction to go.

You gave me the whole code, and it might be just what I need, but I need
just a little bit more information what this code does and what I need to
learn about. I already got some books on Excel and will throw myself into
reading as soon I figure out what I need to know :-)

--
Vedad



"excelent" skrev:
 
Hi excelent

I'm a new bee (total idiot) in VBA programming. Until now I just used some
easy formulas in Excel sheets, but I have an ambition about learning more
about VBA and more advanced functions in Excel.

Since I'm so inexperienced, I was not sure where to start (and I was hoping
that it can be solved easily with some embedded Excel functions) Therefore, I
presented the whole problem hoping that somebody will help me at least in
which direction to go.

You gave me the whole code, and it might be just what I need, but I need
just a little bit more information what this code does and what I need to
learn about. I already got some books on Excel and will throw myself into
reading as soon I figure out what I need to know :-)

--
Vedad



"excelent" skrev:
 
First select kode and copy
in excel press ALT+ F11
paste kode in window on right side
back to excel
press ALT+F8
select macro (tst)
and press run

the macro copy ur values in sheet1 and sheet2
where column C is = YES
and put it on sheet3 and make a sort of column D then B

bout learning vba
try look in here, there is a lot to learn just reding
the questions and answer.

sry my french - from Denmark :-)
 
First select kode and copy
in excel press ALT+ F11
paste kode in window on right side
back to excel
press ALT+F8
select macro (tst)
and press run

the macro copy ur values in sheet1 and sheet2
where column C is = YES
and put it on sheet3 and make a sort of column D then B

bout learning vba
try look in here, there is a lot to learn just reding
the questions and answer.

sry my french - from Denmark :-)
 
Hej excelent

mange tak din hjælp. Jeg vil lige sætte mig lidt mere i VBA og afprøve din
kode. Det kan godt være at virker.

Hilsen
 

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

Back
Top