chewjekhui
New Member
- Joined
- Aug 16, 2018
- Messages
- 3
Hi there,
I need some help in terms of the code I require for prompting the user to key in the material number and using that material number as a wildcard filter to search the excel sheet and copy the values from 2 columns and copy the material numbers that contain the search term and paste it to a new excel sheet.
For example: HBA12906250000 and HBA12906280AZ0 . The alphanumeric number after HBA129062 changes and might repeat. So I want a user prompt that allows the user to key in HBA129062 and all possible combinations of that to be copied and pasted in a new sheet.
It then also copies and paste the plant stock value and plant stock value alongside with the material numbers copied earlier.
<colgroup><col><col><col><col span="3"><col></colgroup><tbody>
</tbody>
I have been searching around forums and so far I am only able to find code that has the search criteria fixed in the VBA code. Could not get wildcard filter VBA codes.
Any help is greatly appreciated
I need some help in terms of the code I require for prompting the user to key in the material number and using that material number as a wildcard filter to search the excel sheet and copy the values from 2 columns and copy the material numbers that contain the search term and paste it to a new excel sheet.
For example: HBA12906250000 and HBA12906280AZ0 . The alphanumeric number after HBA129062 changes and might repeat. So I want a user prompt that allows the user to key in HBA129062 and all possible combinations of that to be copied and pasted in a new sheet.
It then also copies and paste the plant stock value and plant stock value alongside with the material numbers copied earlier.
Material Number | Type | Std Cost | Material | Plant stock | Plant stock value | |
HBA12906250000 | YRAW | BAR | 11.82 | 0 | 1.51 | 17.85 |
HBA12906250000 | YRAW | BAR | 22.14 | 1 | 33 | 730.62 |
HBA12906280AZ0 | YRAW | BAR | 39.64 | 1 | 9.375 | 371.63 |
HBA12906280AZ0 | YRAW | BAR | 10.64 | 1 | 144.5 | 1537.48 |
HBA12906250000 | YRAW | BAR | 1.88 | 1 | 47.125 | 88.6 |
HBA137030500000 | YRAW | BAR | 3.7 | 1 | 97.072 | 359.17 |
HBA137030800000 | YRAW | BAR | 5.1 | 1 | 18.5 | 94.35 |
HBA137030500000 | YRAW | BAR | 20.87 | 1 | 126.01 | 2629.83 |
HBA137030800000 | YRAW | BAR | 27.98 | 1 | 8.375 | 234.33 |
HBA137030900000 | YRAW | BAR | 22.84 | 1 | 5.376 | 122.79 |
HBA137030900000 | YRAW | BAR | 17.68 | 1 | 13.02 | 230.19 |
<colgroup><col><col><col><col span="3"><col></colgroup><tbody>
</tbody>
I have been searching around forums and so far I am only able to find code that has the search criteria fixed in the VBA code. Could not get wildcard filter VBA codes.
Any help is greatly appreciated