+ Reply to Thread
Results 1 to 10 of 10

Matching multiple critierion across multiple columns

  1. #1
    Registered User
    Join Date
    11-15-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2007
    Posts
    97

    Matching multiple critierion across multiple columns

    Hi. I am developing a macro to add records. I am capturing the data in sheet1 in cells A1, B1 and C1. These cells are updated into a table in Sheet2. Cell A1 information is saved in column D in Sheet2, Cell B1 info in column E and Cell C1 in column G. Before updating the information, I need to make sure that the table does not already contain a row in which column D data matches cell A1, column E matches cell B1 and column G matches cell C1.

    Can somone help me with a macro that will do the search. Thanks in advance for your efforts
    Last edited by anandvh; 12-09-2011 at 01:39 AM.

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Matching multiple critierion across multiple columns

    I suggest you post a small sample workbook.

  3. #3
    Registered User
    Join Date
    11-15-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2007
    Posts
    97

    Re: Matching multiple critierion across multiple columns

    Thanks Form Guru for your response. As suggested I have uploaded a sample workbook.

  4. #4
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Matching multiple critierion across multiple columns

    OK so in your example we are checking which columns on sheet2 - it's not D, E and G? Is it A, E and F?

    Also what's the point of your total column if C and D are always zero?
    Last edited by StephenR; 12-07-2011 at 03:31 PM.

  5. #5
    Registered User
    Join Date
    11-15-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2007
    Posts
    97

    Re: Matching multiple critierion across multiple columns

    The matching in the example is for Cell A2 in Sheet1 to Column A in sheet2; cell B2 in sheet1 to Column B in Sheet2 and cell C2 in sheet1 to column F in Sheet2. The table in sheet2 stores the sales tax rates which change from time to time. Provision has been made for a surcharge and cess which is introduced for some years. Currently these are not applicable hence the forced 0 in columns C and D. The surcharge and cess are calculated on the tax value, hence I use the total column to get the final percentage to be charged when the rate is applied rather than calculate this for every transaction.

    Hope this would clarify your queries

  6. #6
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Matching multiple critierion across multiple columns

    Have you removed your attachment - it seems to have disappeared? In any case please could you upload again?

  7. #7
    Registered User
    Join Date
    11-15-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2007
    Posts
    97

    Re: Matching multiple critierion across multiple columns

    Attaching the file. Cant understand how this disappeared.

  8. #8
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Matching multiple critierion across multiple columns

    Very mysterious, might be a problem with the forum. See if this does what you want:
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    11-15-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2007
    Posts
    97

    Re: Matching multiple critierion across multiple columns

    Thanks StephenR for your effort. Will try this code out and get back to you.

  10. #10
    Registered User
    Join Date
    11-15-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2007
    Posts
    97

    Re: Matching multiple critierion across multiple columns

    Tried out the code. Worked like a charm. Thanks a lot for your help

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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