Conditioning one Calc cell on another

Report
-
TrowaD
Posts
2599
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
March 24, 2020
-
Hello, does anyone know a way to make it so that a cell in Open Office Calc cannot be left empty, or at least that there will be an error message if it is, if the cell to the left has data entered?



System Configuration: Windows / Firefox 52.0

1 reply

Posts
2599
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
March 24, 2020
401
Hi Alan,

Open Office, not sure what works compared to Excel.

VBA code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Range("A1"), Target) Is Nothing Then Exit Sub
If Target.Value <> vbNullString And Target.Offset(0, 1).Value = vbNullString Then _
MsgBox ("Don't forget to enter the cell to the right.")
End Sub

When cell A1 is changed and contains data and cell B1 doesn't, then a message is displayed.



Data Validation:
Enter a Input Message (2nd tab) to show when cell is selected.



Insert Comment:
Right-click cell to add comment to cell.



Conditional Formatting:
Select B1 and choose to use a formula: =EN($A1<>"";$B1="")


This is what I could think of. Hopefully there is something you like and can use.

Best regards,
Trowa
1
Thank you

Glad we were able to help! Love us? Write us a review! Rate CCM

CCM 3782 users have said thank you to us this month