VBA create table from existing table selecting rows based on values

NiccoExcel

New Member
Joined
Oct 30, 2015
Messages
6
I need to create a new table in excel on the existing sheet "ScratchPad" by pulling rows from the existing table named "ChemItems" but I only want to pull the rows if a value is populated in the column "Sale Price". Here is an example of the ChemItems table:

ItemNameSale Price
00821463Super Rave$10.00
00812028Pink Suds
00824031Supersan$150.00
00132486PF-2$50.00

<tbody>
</tbody>

There are other existing columns on the table, but as far as I know they are irrelevant to the program I want to create. If I were to run the program successfully it would result in a new table on the sheet "ScratchPad" that would look like this:

ItemNameSale Price
00821463Super Rave$10.00
00824031Supersan$150.00
00132486PF-2$50.00

<tbody>
</tbody>

Note that the "Pink Suds" item was removed because there was no value in the sale price.

I think I need to create a FOR NEXT program but I am not really sure where to begin. Please Help! :)
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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