ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Compare ENTRIE row in OLD_Sheet.xls and Update the Comments Column Value in NEW.xls (https://www.excelbanter.com/excel-discussion-misc-queries/265617-compare-entrie-row-old_sheet-xls-update-comments-column-value-new-xls.html)

vsugadev

Compare ENTRIE row in OLD_Sheet.xls and Update the Comments Column Value in NEW.xls
 
Hi All, [I have attached same files]
I want to write a macro to Compare ENTRIE row in NEW_SHEET.xls.If any records present in OLD_Sheet.xls.Our macro should update Only Comments column [P:P] value in NEW_SHEET.xls status field.
================================================== ===============
IF (Any OLD_SHEET Record present in NEW_SHEET) then
{
Update NEW_SHEET.COMMENTS= OLD_SHEET.COMMENTS

}
Else
{
Print "NEW RECORD" in NEW_SHEET.COMMENTS
}
================================================== ===============
Thanks
Sugadev V.

David of XL Plus

Quote:

Originally Posted by vsugadev (Post 959117)
Hi All, [I have attached same files]
I want to write a macro to Compare ENTRIE row in NEW_SHEET.xls.If any records present in OLD_Sheet.xls.Our macro should update Only Comments column [P:P] value in NEW_SHEET.xls status field.
================================================== ===============
IF (Any OLD_SHEET Record present in NEW_SHEET) then
{
Update NEW_SHEET.COMMENTS= OLD_SHEET.COMMENTS

}
Else
{
Print "NEW RECORD" in NEW_SHEET.COMMENTS
}
================================================== ===============
Thanks
Sugadev V.

Hi,

This can be achieved with nested loop in VBA.

For each Row

For each Cell

(Do Compare and Report Thing)

Next Cell

Next Row


Obviously you will need some unique identifier such as an account No. to match.

Educo


All times are GMT +1. The time now is 03:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com