ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   validate data based on data within another spreadsheet (https://www.excelbanter.com/excel-programming/355489-validate-data-based-data-within-another-spreadsheet.html)

dsb[_2_]

validate data based on data within another spreadsheet
 
HI

I am trying to develop a macro for data entry and need the macro to
validate that it is posting data to the correct cell. I have done this
by creating a loop which checks to see if the category cell currently
selected in the document data is pasted too equals the category cell in
the document data is copied from.

This is the code I have come up with:

Do Until ActiveCell = "
ActiveCell.Offset(1, 0).Select

If ActiveCell = "end" Then Exit Do

Ideally I would like to avoid having to type in the phrase
" and just have the macro check that the cell it is copying
from equals the cell it is pasting too (the titles not the actual
data). This is something I attempted to give you an idea:


Do Until ActiveCell = ([Budget.xls]Annual!C10)

ActiveCell.Offset(1, 0).Select

If ActiveCell = "end" Then Exit Do

Obviously this does not work but it gives you the idea of what I am
trying to do.

Any help is greatly appreciated,

Thank You



All times are GMT +1. The time now is 05:12 PM.

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