|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (6 bit)
Join Date: May 2000
Posts: 49
|
Finding data and exporting to another file/worksheet from Excel
Hi all,
I was wondering if there was a way to possibly do the following items in Excel with VBA: 1) With two rows of data in excel (i.e. Column A being an item number and Column B being a quantity), is there a way to say if Column B (the quantity) is equal to zero, then either copy/export etc. the contents to the left of that quantity (i.e. if the quantity in column B3 was zero, then it would refer to A3) would be copied to a text file or possibly another excel sheet? 2) Another thing I worked on was how to do a comparison of items that I have. Let's say I have an item list from today, and one from yesterday. Yesterday's list has some new and missing items compared to today's list. To compare the two, I do this: My spreadsheet has two columns, one that I put yesterday's item number into (A) and one that I put today's numbers into (B). The third column (C) has (for 3500 rows) the fomula "=VLOOKUP(B2,C:C,1,FALSE)" which will cause the spreadsheet to look in column C for the value located in that particular cell. If it finds the value, it will display that value in the cell. If it does not find that value, it displays "#N/A" in the cell. I have one or two other formulas to make a virtual "marker" that the number is missing from the other sheet. This also makes it difficult since I have to scroll through the list to see which items no longer exist. Is there an easier way of doing all of this? I'm assuming with VBA, but I cannot find the resources I'm looking for anywhere I look. If you anyone needs more detail, please let me know. |
|
|
|
|
|
#2 |
|
Member (7 bit)
Join Date: Nov 2001
Location: Rochester, NY
Posts: 87
|
Question #1
This addresses question #1. As currently written, it needs to be run while the sheet you want to investigate is active.
|
|
|
|
|
|
#3 |
|
Member (7 bit)
Join Date: Nov 2001
Location: Rochester, NY
Posts: 87
|
Question #2
This addresses Question #2. THis is not great code, but it does work.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|