Martin Bennett
New Member
- Joined
- Jan 16, 2019
- Messages
- 2
Hi All
Hoping someone can offer some advice, both my colleague and myself are far from experts with VBA. We have an excel workbook that collates multiple material lists using VBA and consolidates a final version for stores this is all working fine. We are now trying to add some error checking into the workbook for example if column B contains part numbers 123 & 125 does it contain part number 127 or 131 if it does take no action, if it does not Flag up a message Part number 127 or 131 missing notify engineering.
We have tried a number of different methods but can't get this to work i.e. if, and, or. I'm sure there is a very simple method and we are overlooking something
[TABLE="class: outer_border, width: 80"]
<tbody>[TR]
[TD]Part No.[/TD]
[/TR]
[TR]
[TD]123[/TD]
[/TR]
[TR]
[TD]124
[/TD]
[/TR]
[TR]
[TD]125[/TD]
[/TR]
[TR]
[TD]126[/TD]
[/TR]
[TR]
[TD]127[/TD]
[/TR]
[TR]
[TD]128[/TD]
[/TR]
[TR]
[TD]129[/TD]
[/TR]
[TR]
[TD]130[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Thanks in advance
Hoping someone can offer some advice, both my colleague and myself are far from experts with VBA. We have an excel workbook that collates multiple material lists using VBA and consolidates a final version for stores this is all working fine. We are now trying to add some error checking into the workbook for example if column B contains part numbers 123 & 125 does it contain part number 127 or 131 if it does take no action, if it does not Flag up a message Part number 127 or 131 missing notify engineering.
We have tried a number of different methods but can't get this to work i.e. if, and, or. I'm sure there is a very simple method and we are overlooking something
[TABLE="class: outer_border, width: 80"]
<tbody>[TR]
[TD]Part No.[/TD]
[/TR]
[TR]
[TD]123[/TD]
[/TR]
[TR]
[TD]124
[/TD]
[/TR]
[TR]
[TD]125[/TD]
[/TR]
[TR]
[TD]126[/TD]
[/TR]
[TR]
[TD]127[/TD]
[/TR]
[TR]
[TD]128[/TD]
[/TR]
[TR]
[TD]129[/TD]
[/TR]
[TR]
[TD]130[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Thanks in advance