none
VBscript for data matching RRS feed

  • Question

  • Hi All,


    I have a requirment can anyone help how can i achive this with vbscript. 

    Below is my requirment

    I have a data in which  4 columns are there so in that 4 columns we should compare 2 columns and based on that a new column should be created and write the output


    Example

    In sheet1 below are the columns 


    Invoice No City Quantity Price
    The invoice of a product is delivered at 500038 and the delivery executive name is hji Hyderabad 1 900
    The invoice of a product is delivered at 507889 and the delivery executive name is hji Pune 2 1800
    The invoice of a product is delivered at 500138  and the delivery executive name is hji Karimnagar 1 900
    The invoice of a product is delivered at 500039 and the delivery executive name is hji Kadapa 4 3600
    The invoice of a product is delivered at 500238 and the delivery executive name is hji Goa 2 1800


    In Sheet2 below are the columns

    Match Content in Invoice No Match Content in City Area
    500038 Hyderabad SR Nagar
    507889 Pune lalu nagar
    500138 Karimnagar RN Nagar
    500039 Kadapa mastangi nagar
    500238 Goa RN Road


    In sheet1  cloumn1 and cloumn2 matches with sheet2 column1 and column 2 it should add a column in sheet1 with 3 column as output 

    Invoice No City Quantity Price Area
    The invoice of a product is delivered at 500038 and the delivery executive name is hji Hyderabad 1 900 SR Nagar
    The invoice of a product is delivered at 507889 and the delivery executive name is hji Pune 2 1800 lalu nagar
    The invoice of a product is delivered at 500138  and the delivery executive name is hji Karimnagar 1 900 RN Nagar
    The invoice of a product is delivered at 500039 and the delivery executive name is hji Kadapa 4 3600 mastangi nagar
    The invoice of a product is delivered at 500238 and the delivery executive name is hji Goa 2 1800 RN Road


    In sheet1 column1 and column2 of row1 should compare with all the rows of sheet 2 column1 and column2 everytime and should displaay the output as above
    Saturday, May 18, 2019 12:22 PM

All replies

  • Most people around here that enjoy helping others are reluctant to help with class assignments. You have shown us what the instructor has written. We want to see what you have done. The best way to help you is to help you solve the problem yourself. You should analyze the requirements (that you have shown here) then determine what needs to be done. You can do that using whatever words and such that you understand. Then you need to analyze how to do each of them. Then when you need help with something ask a question about something specific and tell us what you have done to attempt to solve it yourself.


    Sam Hobbs
    SimpleSamples.Info

    Sunday, May 19, 2019 9:30 PM