Results 1 to 2 of 2

Thread: Validation checking for data mismatch

  1. #1

    Validation checking for data mismatch



    Register for a FREE account, and/
    or Log in to avoid these ads!

    Hi All,

    I used to copy row data from database and paste in col c,d,e and f. And after this i have to compare with col g and h to see if the data pasted is correct or is mismatched. Most of the time the data is mismatched. To see the mismatched data, we can check both the sheets that i have attached, "Sample.xlsm(sheet before modification" and "Sample after clicking correct data button in Sample excel.xlsm(sheet after manual modification)" excel sheets.

    1st requirement:
    If column c and column d is not equal to column g and column h, then column b and column i will show red colour in the cell behind the column with mismatch.
    Else it will show green color. May be we can use some formula in col b and i to compare the datas of col c,d and col g,h.

    My Logic
    If (col c && col d <> col g && col h)
    then
    fill col b and col i with red colour
    else fill col b and col i with green color

    2nd requirement
    A button named "Correct Data"

    If we press this button then respective col c, d , e and f should be corrected with reference to col g and h. I need some VBA script which will do the change and correct the mismatch

    Eg : Correct data after clicking button "correct data" will show the data as shown in "Sample after clicking correct data button in Sample excel.xlsm sheet".

    Sheet Attached

    Sample.xlsmSample.xlsm

    Sample after clicking correct data button in Sample excel.xlsm

    Thanks in Advance :-)

  2. #2
    Hi aakhan,

    Use below formula in C6 of "Sample after clicking correct data button in Sample excel.xlsm" and fill across.
    Remember to enter this formula using key combination of ctrl shift enter.


    =INDEX([Sample.xlsm]Sheet1!C$6:C$1000,MATCH($G6&$H6,[Sample.xlsm]Sheet1!$C$6:$C$1000&[Sample.xlsm]Sheet1!$D$6:$D$1000,0))

    After this, you can put a conditional formatting to green or red the cells.

    Regards,
    DILIPandey

Tags for this Thread

Posting Permissions

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