tonywatsonhelp
Well-known Member
- Joined
- Feb 24, 2014
- Messages
- 3,212
- Office Version
- 365
- 2019
- 2016
- Platform
- Windows
Hi Everyone,
I have a document that i need to do some checks on with a macro,
the first macro needs to check if every used row in column E of range (E15:P(last row)) has number in it and that every number is 6 digits long.
the rule are this,
i need to find last row buy finding the last row used in columns E:P but any column could have the last row of data as data can be missing.
once we know what last row is we do this,
go dowm Range E15:E lastrow) check each cell has data in it, if cell is empty them fill it yellow,
for each cell with data in it check if the data is a number 6 digits long (on decimals) only,
if not fill it Red anf font white,
if its correct then fill light green.
if any cells are blank then message box "You have some blank cell in "Account" column please fix each yellow cell before proceeding!"
if any cells are not numbers then message box "You have some incorrect inputs in the "Account" column please fix each red cell before proceeding!"
and if there are both then
message box "You have some incorrect inputs and blank cell in the "Account" column please fix each red and each yellow cell before proceeding!"
please help if you can thanks
Tony
I have a document that i need to do some checks on with a macro,
the first macro needs to check if every used row in column E of range (E15:P(last row)) has number in it and that every number is 6 digits long.
the rule are this,
i need to find last row buy finding the last row used in columns E:P but any column could have the last row of data as data can be missing.
once we know what last row is we do this,
go dowm Range E15:E lastrow) check each cell has data in it, if cell is empty them fill it yellow,
for each cell with data in it check if the data is a number 6 digits long (on decimals) only,
if not fill it Red anf font white,
if its correct then fill light green.
if any cells are blank then message box "You have some blank cell in "Account" column please fix each yellow cell before proceeding!"
if any cells are not numbers then message box "You have some incorrect inputs in the "Account" column please fix each red cell before proceeding!"
and if there are both then
message box "You have some incorrect inputs and blank cell in the "Account" column please fix each red and each yellow cell before proceeding!"
please help if you can thanks
Tony