+ Reply to Thread
Results 1 to 17 of 17

How You Can Bulk Validate VAT Numbers (macro in excel)

  1. #1
    Registered User
    Join Date
    07-05-2021
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    4

    How You Can Bulk Validate VAT Numbers (macro in excel)

    Dear All,

    could you please share with me working macro to be used in excel for validation of EU VAT numbers per batch?

    Examples to be validated:

    Tax ID
    IT00851460154
    M200821408
    FR69316853332
    BE0406762669
    BE0400622470
    BE0425815647
    BE0458777138
    BE0439752567
    BE0404636389
    BE0429096029
    BE0431049588
    DE140127410
    DE277644461
    DE141737497
    DE140362638
    DE153551436

    There was such formula shared by Watersev in the thread of angeloo, title: Macro to check VAT Numeber, but I get an error, when I try to use it.
    Can anybody help with that?

    Many thanks in advance!

    Greetings,

  2. #2
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,220

    Re: How You Can Bulk Validate VAT Numbers (macro in excel)

    Please note that the VIES server is only an "intermediary". The databases of relevant countries are polled. When we receive the answer "Unverified", it may mean that the server of the given country is not responding or the VIES server is overloaded. These numbers should be checked again in a while.
    Great Britain is no longer being verified.
    Efficiency, depending on the bandwidth and load - about 130-180 identifiers per minute.

    Since Sucuri Website Firewall did not allow the code to be published, I included it in the attachment.

    Artik
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    07-05-2021
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    4

    Re: How You Can Bulk Validate VAT Numbers (macro in excel)

    Hi Artik,

    thank you for your answer and explanation. But file which you uploaded does not seem to contain macro. It is just a list of the VAT numbers, I think. Could you please check if you uploaded correct file?
    Many thanks in advance!

    Greetings,
    Broagn

    BTW: I am actually also from Poland, just living in NL.

  4. #4
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,220

    Re: How You Can Bulk Validate VAT Numbers (macro in excel)

    I checked. Everything is fine with the file.

    When you download a file from the Internet or an e-mail client (Outlook), the file is often blocked by the system to protect your computer. When you open a file, a yellow bar with warnings appears below the ribbon. First warning - You must agree to edit this file. Second warning - you must agree to run the macros. When you agree to edit and run the macros, then press the keyboard shortcut LAlt + F8. The macro name "Test" should appear on the list. Run them.

    Artik

  5. #5
    Registered User
    Join Date
    07-05-2021
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    4

    Re: How You Can Bulk Validate VAT Numbers (macro in excel)

    Dear Artik! You are completely right!!! It works. Many thanks for your help!

    Have a nice evening!
    Greetings,
    Broagn
    Last edited by broagn; 07-08-2021 at 04:44 PM.

  6. #6
    Registered User
    Join Date
    08-11-2022
    Location
    L?rrach
    MS-Off Ver
    latest
    Posts
    1

    Re: How You Can Bulk Validate VAT Numbers (macro in excel)

    Dear Artik

    Thank you very much for this great macro.

    I would also like to call up the "traders" names and addresses. (see below)

    Is it possible to add this macro?

    BR / Thomas

    <xsd:element name="countryCode" type="xsd:string"/>
    <xsd:element name="vatNumber" type="xsd:string"/>
    <xsd:element name="requestDate" type="xsd:date"/>
    <xsd:element name="valid" type="xsd:boolean"/>
    <xsd:element maxOccurs="1" minOccurs="0" name="traderName" nillable="true" type="xsd:string"/>
    <xsd:element maxOccurs="1" minOccurs="0" name="traderCompanyType" nillable="true" type="tns1:companyTypeCode"/>
    <xsd:element maxOccurs="1" minOccurs="0" name="traderAddress" type="xsd:string"/>
    <xsd:element maxOccurs="1" minOccurs="0" name="traderStreet" type="xsd:string"/>
    <xsd:element maxOccurs="1" minOccurs="0" name="traderPostcode" type="xsd:string"/>
    <xsd:element maxOccurs="1" minOccurs="0" name="traderCity" type="xsd:string"/>
    <xsd:element maxOccurs="1" minOccurs="0" name="traderNameMatch" type="tns1:matchCode"/>
    <xsd:element maxOccurs="1" minOccurs="0" name="traderCompanyTypeMatch" type="tns1:matchCode"/>
    <xsd:element maxOccurs="1" minOccurs="0" name="traderStreetMatch" type="tns1:matchCode"/>
    <xsd:element maxOccurs="1" minOccurs="0" name="traderPostcodeMatch" type="tns1:matchCode"/>
    <xsd:element maxOccurs="1" minOccurs="0" name="traderCityMatch" type="tns1:matchCode"/>

  7. #7
    Registered User
    Join Date
    08-27-2022
    Location
    Portugal
    MS-Off Ver
    office pro 2019
    Posts
    1

    Re: How You Can Bulk Validate VAT Numbers (macro in excel)

    i trie this, but

    EL 090049628 Invalid VAT number
    ES 00000005M Unverified

    PT 195412613 - its valid, mas the macro in excel is invalid

  8. #8
    Registered User
    Join Date
    09-07-2022
    Location
    Denmark
    MS-Off Ver
    365
    Posts
    2

    Re: How You Can Bulk Validate VAT Numbers (macro in excel)

    Dear Artik,

    I just tried out your macro after downloading the file: VAT IDs Verification.
    The macro runs without any errors but the result is "Invalid VAT number" for all 84 records.
    Do you have an idea why I get this result ?
    Your feedback is very much appreciated.

    Best regards
    Kim

  9. #9
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,220

    Re: How You Can Bulk Validate VAT Numbers (macro in excel)

    There was a slight change in the VIES server response, hence the problems with incorrect results.
    Attached is the new version.

    Artik
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    09-07-2022
    Location
    Denmark
    MS-Off Ver
    365
    Posts
    2

    Re: How You Can Bulk Validate VAT Numbers (macro in excel)

    Thank you very much
    It is working now :-)
    Kim

  11. #11
    Registered User
    Join Date
    05-10-2019
    Location
    india
    MS-Off Ver
    2016
    Posts
    1

    Question Re: How You Can Bulk Validate VAT Numbers (macro in excel)

    Dear Artik,

    I have used this code to run with little changes that include picking data from specific cells.

    .Open "POST", "weblink", False
    .Send (Soap)

    At this line of code, I'm getting the error "Access is Denied". I have tried updating the link of VIES but no luck. please help

    Thanks in advance.
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    01-13-2023
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    3

    Post Re: How You Can Bulk Validate VAT Numbers (macro in excel)

    Hi I've tried to run this but it's saying Invalid VAT number even on VAT numbers I know are correct? Is there something else I need to do other than paste in the country code and VAT number?

    eg.
    GB 455585025
    GB 150484032
    Last edited by alhamilton13; 01-13-2023 at 11:37 AM.

  13. #13
    Registered User
    Join Date
    01-13-2023
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    3

    Re: How You Can Bulk Validate VAT Numbers (macro in excel)

    Hi Artik, thanks for your help, are you available at all please?

    I've tried to run this but it's saying Invalid VAT number even on VAT numbers I know are correct? Is there something else I need to do other than paste in the country code and VAT number?

    eg.
    GB 455585025
    GB 150484032

  14. #14
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,220

    Re: How You Can Bulk Validate VAT Numbers (macro in excel)

    I guess you forgot that GB left the EU. The VIES system verifies the IDs of EU members only.

    Artik

  15. #15
    Registered User
    Join Date
    01-13-2023
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    3
    Quote Originally Posted by Artik View Post
    I guess you forgot that GB left the EU. The VIES system verifies the IDs of EU members only.

    Artik
    ahh yes, good point thank you!

  16. #16
    Registered User
    Join Date
    01-28-2023
    Location
    Warsaw
    MS-Off Ver
    Excel
    Posts
    1

    Re: How You Can Bulk Validate VAT Numbers (macro in excel)

    My Dear Friends,

    The file is unparalleled! But is it possible to add the VAT number of the entity requesting the VAT number to the formula and the ConsultationNumber appears in the result? Attachment 815398Attachment 815399

    I am honestly new to VBA and find it difficult to grasp the language even from scratch I hope you will support me

    Kamila

  17. #17
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: How You Can Bulk Validate VAT Numbers (macro in excel)

    Quote Originally Posted by ordinary_stone View Post
    My Dear Friends,

    The file is unparalleled! But is it possible to add the VAT number of the entity requesting the VAT number to the formula and the ConsultationNumber appears in the result? Attachment 815398Attachment 815399

    I am honestly new to VBA and find it difficult to grasp the language even from scratch I hope you will support me

    Kamila
    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. write Macro to create bulk pdf in Excel ?
    By jooyyin in forum Excel General
    Replies: 0
    Last Post: 07-18-2018, 12:38 AM
  2. Replies: 3
    Last Post: 02-07-2014, 09:46 AM
  3. Excel containing macro to send bulk mails from outlook with multiple attachments
    By amandeep08 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-16-2013, 02:19 PM
  4. [SOLVED] Bulk emails send use outlook & excel coding macro
    By sonu_kumar444 in forum Outlook Formatting & Functions
    Replies: 0
    Last Post: 12-26-2012, 08:06 AM
  5. [SOLVED] Macro to validate values that must be identical on an Excel form
    By nomis6565 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-18-2012, 03:27 PM
  6. Replies: 0
    Last Post: 06-15-2012, 09:50 AM
  7. Bulk convert numbers to text
    By twizzler3 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-13-2011, 04:36 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1