How to ferase value in column "Aantal" if "Locatie" is not "A00"

Romano_odK

Active Member
Joined
Jun 4, 2020
Messages
380
Office Version
  1. 365
Platform
  1. Windows
Good afternoon,

I got a table with values that are refreshed from a SQL database. I get lines with itemcode, description etc where the stock is in column "J" (Voorraad) on every location (Locatie). What I would like to accomplish is that I won't see the value in column "Aantal" if the "Locatie" in column "I' is not "A00".
This has to be done every time I refresh the table, can this be done?

Thank you for you time and efforts.

Romano

ArtikelcodeOmschrijvingKostprijsVrrdrekOntvgstdatumAantalMagazijnStd_locatieLocatieVoorraad
100000Vito Glaserfix 111 6x2 mm wit - 10x25 m1390111/07/2023961P02B A00121
100001Vito Glaserfix 111 6x2 mm zwart - 10x25 m2390118/04/2023961P04B P04B 106
100002Vito Glaserfix 111 6x3 mm wit - 10x25 m3390111/07/2023961P02B P02B 63
100003Vito Glaserfix 111 6x3 mm zwart - 10x25 m4390125/04/2023961P04B P04B 40
100004Vito Glaserfix 111 6x4 mm wit - 10x25 m5390106/09/2023961P02B P02B 97
100004Vito Glaserfix 111 6x4 mm wit - 10x25 m6390106/09/2023961P02B P02C 60
100005Vito Glaserfix 111 6x4 mm zwart - 10x25 m7390131/03/2021961A00 P04B 53
100006Vito Glaserfix 111 9x2 mm wit - 10x25 m8390118/07/2023601P01B P01B 20
100007Vito Glaserfix 111 9x2 mm zwart - 10x25 m9390116/08/2023601P03B P03B 118
 
I don't see anything in that code that would produce an error, it would just ignore it and go to the next file.
Are you sure that you don't have errors somewhere on your sheet?

Please show/tell us the following:
- What is the exact error message you are getting?
- Does it give you a "Debug" option, and if it does, if you hit it, what line of code does it highlight?
- Can you show us a sample of data when this error occurs?
 
Upvote 0

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

Forum statistics

Threads
1,223,894
Messages
6,175,254
Members
452,624
Latest member
gregg777

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