VBA to find any changes in lastrow

Vigash

New Member
Joined
Aug 26, 2022
Messages
21
Office Version
  1. 2013
Platform
  1. Windows
Hi All,

I am trying to find the last row using VBA in the table. I found the last row but my challenge is how to store that value and compare it with new last row.
My aim is to if any changes in the last row, it will trigger a macro.

Thanks in advance.

Regards,
Vigash
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
to store the value for long term use I believe it is necessary to write it into a cell inside the workbook. I usually use a hidden worksheet.

you can then compare the new last row data to that which is stored in the hidden sheet and trigger your macro to run. if necessary your macro would also need to update the stored last row data
 
Upvote 0
Solution
to store the value for long term use I believe it is necessary to write it into a cell inside the workbook. I usually use a hidden worksheet.

you can then compare the new last row data to that which is stored in the hidden sheet and trigger your macro to run. if necessary your macro would also need to update the stored last row data
Thank you so much for the valuable advice. I was struck for 2 days. You made my day thank you so much. Thank you so much for this platform.
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,190
Members
452,616
Latest member
intern444

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top