MCaliebe
asked on
Locate and copy excel data from one work book into new work book based on specific criteria.
Hello everyone,
I am looking for some assistance creating a custom cut and paste macro for Excel.
I currently have a spreadsheet with columns ranging "A:BZ: I need to examine two fields in each row, begining on Row 3. The spreadsheet being examined is 'VIEWFMT" and will always have this title.
I need to look at each PART NUMBER in Column "BF" and the corresponding QUANTITY in Column "BM". Using row 3 as an example, If the quantity in "BM3" is greater then 0, then I want to copy "BF3" and "BM3" to a New workbook (Sheet1), "A1:B1". I want to loop through the list of 600 lines until complete.
I apprecaite any help that is available.
MC
I am looking for some assistance creating a custom cut and paste macro for Excel.
I currently have a spreadsheet with columns ranging "A:BZ: I need to examine two fields in each row, begining on Row 3. The spreadsheet being examined is 'VIEWFMT" and will always have this title.
I need to look at each PART NUMBER in Column "BF" and the corresponding QUANTITY in Column "BM". Using row 3 as an example, If the quantity in "BM3" is greater then 0, then I want to copy "BF3" and "BM3" to a New workbook (Sheet1), "A1:B1". I want to loop through the list of 600 lines until complete.
I apprecaite any help that is available.
MC
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The value in the cell should make no difference if it's typed or 0.
I don't know what data you are working with, but there's a slight possibility there could be some accuracy problems.
That really depends on what calculations you are doing and the data.
Another possibility is that you have cells populated to say 2 decimal places whereas the actual value is 0.001.
As for the new workbook, how about just copying the sheet with the results.
Since it's a copy, the original Sheet1 will still be in the original workbook.
If you don't want that you can create the new workbook at the beginning and copy to that.
The tricky thing there is making sure the code refers to the correct workbooks/sheets.
I don't know what data you are working with, but there's a slight possibility there could be some accuracy problems.
That really depends on what calculations you are doing and the data.
Another possibility is that you have cells populated to say 2 decimal places whereas the actual value is 0.001.
As for the new workbook, how about just copying the sheet with the results.
Worksheets("Sheet1").Copy
This will create a new workbook with just Sheet1 in it.Since it's a copy, the original Sheet1 will still be in the original workbook.
If you don't want that you can create the new workbook at the beginning and copy to that.
The tricky thing there is making sure the code refers to the correct workbooks/sheets.
ASKER
The only thing I need after I correct this problem is to create a new workbook and transfer this information to the new workbook rather then to a sheet in the existing work book.
Open in new window