mtdewrocks
New Member
- Joined
- Apr 14, 2016
- Messages
- 20
I would like to loop through all rows of data to ensure the region is filled in. If not, I would like an input box to identify the store number and ask the user to input the correct region, and then have what the user typed fill in the empty region cell.
I.e. the store number is 10 but the region which is two columns to the right is empty. Therefore, the loop would prompt an input box saying "Store 10 region is empty. Please enter the correct region."
I tried something along the following, but it isn't working.
J is the looped row, and column 5 is where the region field is. Column 3 maintains the store number.
If Cells(j, 5) = " " Then ActiveCell.Value = UpdatedREGION
UpdatedREGION = Application.InputBox("ActiveCell.Offset(0, -2)" & "region field is empty. Please insert region as KC, DAL, or CHI.")
Cells(j, 5).Value = UpdatedREGION
Please provide guidance if possible.
I.e. the store number is 10 but the region which is two columns to the right is empty. Therefore, the loop would prompt an input box saying "Store 10 region is empty. Please enter the correct region."
I tried something along the following, but it isn't working.
J is the looped row, and column 5 is where the region field is. Column 3 maintains the store number.
If Cells(j, 5) = " " Then ActiveCell.Value = UpdatedREGION
UpdatedREGION = Application.InputBox("ActiveCell.Offset(0, -2)" & "region field is empty. Please insert region as KC, DAL, or CHI.")
Cells(j, 5).Value = UpdatedREGION
Please provide guidance if possible.