Delete unneeded text in cells while keeping relevant text, then exporting that information

shrekspeare

New Member
Joined
Apr 12, 2023
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Good afternoon!

I have an inventory sheet that I receive once a month. In each cell in Column B, there is a product number which varies in length and formatting, the name of a product which varies in length and formatting, and then purchasing specific information. I'm looking for a code that will:


1. Identify numbers greater than zero in Column Z (amount of product used for the month)
2. Take the row attached to the greater than zero numbers in Column Z and delete the extra text in the Column B cell to leave only the product number
3. Export only the product number from Column B and usage from Column Z into a brand new workbook to fill column D (productid) with the product name and F (Usage) with the column Z usage numbers

There are no formulas in the cells and the data isn't linked to anything. It's simply transcribed on the excel sheet by another person from a handwritten sheet they receive.

I have separate code I use for another file that searches data in Sheet2 for keywords specified in Sheet1, then creates Sheet3 and exports that information. Can I tweak the code I already have for what I need or is that making too much work for myself? What's the simplest way to do this?

Bonus points if you can tell me how to tweak the code so the new workbook columns A, B, C, E, G, H, I, and J prefill with standard information such as locations and dates.
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Using XL2BB, post a sample work sheet of 8-10 records. Then mock up your expected solution for those same records and post with XL2BB
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top