aakhan2011
New Member
- Joined
- Jan 12, 2014
- Messages
- 21
Guys i have cross-posted in other forums, please go through the links to find replies to my posts -
http://www.excelforum.com/excel-prog...ml#post3617163
http://www.excelguru.ca/forums/showthread.php?2769-Validation-for-data-mismatch&p=11910#post11910
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.xlsm
Sample after clicking correct data button in Sample excel.xlsm
Thanks in Advance
http://www.excelforum.com/excel-prog...ml#post3617163
http://www.excelguru.ca/forums/showthread.php?2769-Validation-for-data-mismatch&p=11910#post11910
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.xlsm
Sample after clicking correct data button in Sample excel.xlsm
Thanks in Advance

Last edited: