Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Import a CSV file HELP


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Import a CSV file HELP

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I import text file of cash flow to excel file then use formula Bumpa Excel Discussion (Misc queries) 2 May 28th 10 04:22 PM
import file so that it is a actual csv file, no excel cell version broncoburt New Users to Excel 1 November 21st 09 09:09 PM
How do I import text file, analyze data, export results, open next file Geoffro Excel Programming 2 March 6th 05 08:02 PM
Import text file into excel with preset file layout, delimeters VBA meldrape Excel Programming 7 June 15th 04 08:31 PM
Get External Data, Import Text File, File name problem Scott Riddle Excel Programming 1 July 11th 03 05:40 PM


All times are GMT +1. The time now is 01:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"