Need help ....

  • Thread starter Thread starter excelmac
  • Start date Start date
E

excelmac

HI,
i'm very new here. I hope someone can advise me on how to get it
done.

Basically for example, I have a excel worksheet 1 with all my inventory
list;stock code, pricing etc... How can I actually find a particular
stock code in column 3... and find all the rows with the paticular
stock code and copy to worksheet 2 or another excel files. I think I
need to write VBA or marcos right.. which I have no idea on how to do
it.

Below I have attach a sample excel file of my inventory list

I hope someone can advise me on this etc....

Thanks in advance.


Regards
Newbie

Attachment filename: needhelp.xls
Download attachment: http://www.excelforum.com/attachment.php?postid=382451
 
It would help if you first devote a single column to a single type of
data.. you have a lot of intermixed cells there.. would be hard to do
anything with it . Try putting item, price, etc in separate columns
 
hi crisp,
thanks for the swift reply. I'm afraid I can't use the
method you method.. Basically the info is taken from other souces thru
cut & paste and I put in the date & company. I was think for example if
row 11 have the stock code I want, the programming will display the
whole row data to for example worksheet 2.

I hope I can get more advise on this or programming etc.


Thanks
 
Sub getStockCode

stockRow = (number of the row here)
sheets(1).activate
cells(stockRow,1).entirerow.select
sheets(2).activate

'now location of the row you want to copy
' to
range("a1").select
activesheet.paste

End Su
 
You need to insert a row at the top and give it labels>use
data>filter>autofilter>filter as desired and then copy the visible cells.
Record a macro while you do this to get the idea of how to modify to suit
variable needs.
 
Sample workbook sent to email address given


Sub Macro1()
Selection.AutoFilter Field:=2, Criteria1:="ABC"
Rows("12:19").Select
Selection.Copy
Sheets("Sheet2").Select
Rows("4:4").Select
ActiveSheet.Paste
Selection.AutoFilter Field:=2
End Sub
Sub macro1mod()
code = UCase(InputBox("desiredcode"))
x = Sheets("Sheet2").Cells(Rows.Count, "a").End(xlUp).Row + 1
'MsgBox code
Selection.AutoFilter Field:=2, Criteria1:=code
Range("a2:g" & Cells(Rows.Count, "a").End(xlUp).Row).Copy _
Sheets("sheet2").Cells(x, "a")
Selection.AutoFilter Field:=2
End Sub
 
HI Don,
you mention that you sent a sample to email address
given. Actually I did not receive anything... Hope you can post me your
sample results etc to (e-mail address removed)


Thanks


By the way, all those codes you give me I don't really know where to
put it. :(
 
Hi,
due to sometime 2,3 cells mixed together I facing error like data
type mismatch & error 400
 
Back
Top