February 21, 2018
Hi all,
I want to make values in 3 cells mandatory (names written in RED) based on value in Name (if employee enters name they must be required to fill other cells named in RED) otherwise they should see the message "Please fill mandatory cells ie FN ending, iChris ID otherwise you will not be able to save the file"
If they donot fill name cell other cells should not be mandatory.
If they don't fill required cells they should not be able to SAVE the file.
Can someone please help
Thanks
Power Query
Power Pivot
Xtreme Pivot Tables
Excel for Decision Making
Excel for Finance
Excel Analysis Toolpak
Power BI
Excel
Word
Outlook
Excel Expert
Excel Customer Service
PowerPoint
November 8, 2013
Hi Azid,
you can apply conditional formatting to cells A3 and D2 , based on the length of text from B2 cell:
select A3 and D2, Home>conditional Formatting, Add a conditional formatting rule based on a formula: =LEN($A$1)>0
You can disable SAVE only with visual basic, use this code in ThisWorkbook module:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim Wks As Worksheet
Set Wks = ThisWorkbook.Worksheets("Master")
If Wks.Range("B2").Value > 0 Then
If Len(Wks.Range("B3").Value) = 0 And Len(Wks.Range("F2").Value) = 0 Then
MsgBox "Fill all required fields!"
Cancel = True
End If
End If
End Sub
1 Guest(s)