Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I am not sure if this in the right forum, but I need help. OK I have two spreadsheets. One spreadsheet (out of stock) shows model numbers that have been taken out of stock. The other spreadsheet (stock) shows the same model numbers and a quantity field. I need to be able to make the model numbers from the out of stock spreadsheet to be filtered (?) in to my stock spreadsheet and recognize which items are out of stock and change the quanity field to zero. right now the stock spreadsheet has a model # column and a product quantity column, the model # column has numbers in the the product quantity has the number 20 in it all the way down. I should mention there are 6000 rows in the stock spreadsheet. How can I accomplish this?? Thank you. If I didnt explain it right, please ask questions. Melissa -- melissad ------------------------------------------------------------------------ melissad's Profile: http://www.excelforum.com/member.php...o&userid=33273 View this thread: http://www.excelforum.com/showthread...hreadid=530974 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This untested code should get you started. Adjust names and sheet references
to fit your actual situation. Assumes Product Numbers are in column A starting in row 2 and for the Stock sheet, the quantities are in column B. Sub ABC() Dim rng as Range, rng1 as Range Dim cell as Range with Workbooks("Stock.CSV").Worksheets(1) set rng = .Range(.Cells(2,1),.Cells(rows.count,1).End(xlup)) End with With workbooks("Out of Stock.csv").Worksheets(1) set rng1 = .Range(.Cells(2,1),.Cells(rows.count,1).End(xlup)) End with for each cell in rng if application.Countif(rng1,cell) 0 then cell.offset(0,1).Value = 0 end if Next End Sub -- Regards, Tom Ogilvy "melissad" wrote: I am not sure if this in the right forum, but I need help. OK I have two spreadsheets. One spreadsheet (out of stock) shows model numbers that have been taken out of stock. The other spreadsheet (stock) shows the same model numbers and a quantity field. I need to be able to make the model numbers from the out of stock spreadsheet to be filtered (?) in to my stock spreadsheet and recognize which items are out of stock and change the quanity field to zero. right now the stock spreadsheet has a model # column and a product quantity column, the model # column has numbers in the the product quantity has the number 20 in it all the way down. I should mention there are 6000 rows in the stock spreadsheet. How can I accomplish this?? Thank you. If I didnt explain it right, please ask questions. Melissa -- melissad ------------------------------------------------------------------------ melissad's Profile: http://www.excelforum.com/member.php...o&userid=33273 View this thread: http://www.excelforum.com/showthread...hreadid=530974 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can I import text file of cash flow to excel file then use formula | Excel Discussion (Misc queries) | |||
import file so that it is a actual csv file, no excel cell version | New Users to Excel | |||
How do I import text file, analyze data, export results, open next file | Excel Programming | |||
Import text file into excel with preset file layout, delimeters VBA | Excel Programming | |||
Get External Data, Import Text File, File name problem | Excel Programming |