Hi,
i am able to put in a specific text in a cell using a macro, but now i want to validate that macro such that it can enter data only if a particular data exists in another cell.
explanation.
i have the following code written
[Code/]
Sub inputaquablue()
Dim cell As Range
For Each cell In Selection
If cell.Column = 2 And cell.Row >= 14 And cell.Row <= 78 Then
cell.Value = "Aqua Blue"
End If
Next cell
End Sub
[Code]
By using the above i am able to enter "Aqua Blue" in column B, rows 14 to 78, however now i want to allow entry of "Aqua Blue" only if the corresponding cell has the Text or Value "Fish" in it.
Going by the above example i want to enter "Aqua Blue" in cells B20:B25, but it should input "Aqua Blue" only if cells A20:A25 has "Fish" written in them.
If however if "fish is written in only cell A21 then "Aqua Blue" should come in only cell B21.
Regards
Bookmarks