I would like to make mandatory cell that one of the two cells needs to be filled.
F62 or H62, and if H62 is filled prompt to mandatory cell (B55 to K66) to give explanation!
I need to put this in already made code!
Thank you
I would like to make mandatory cell that one of the two cells needs to be filled.
F62 or H62, and if H62 is filled prompt to mandatory cell (B55 to K66) to give explanation!
I need to put this in already made code!
Thank you
So .... show this "already made code"
probably in the place where you check whether H62 is filled you have to add few lines
for instance if you have something like (or may be with do ... loop?)
you could add a part to deal with checking H62 and then if it is not empty - enforcing user to fill additional cells![]()
if Range("F62")<>"" or Range("H62")<>"" then 'action if identified as right else 'action to fill at least one end if
![]()
if Range("F62")<>"" or Range("H62")<>"" then if Range("H62")<>"" then 'check if B55:K66 are filled and if not - enforce filling it end if 'action if identified as right else 'action to fill at least one end if
Best Regards,
Kaper
Hi Kaper,
I have tried both formulas multiple times, and it seems that they do not do anything!
Thanks!
Am I missing something there?
Which formulas?
If you mean my code samples - yes this code does nothing the real action shall be in places with comments, like:
Yeah, you missed (or I see it that way - may be I am wrong) at least two things:![]()
'check if B55:K66 are filled and if not - enforce filling it
1) quote from my post:
2) quote from forum rules:So .... show this "already made code"
Post a WORKBOOK. Nobody wants to type data from a picture or paste text from your post into a spreadsheet as a prelude to helping. To attach a file, push the button with the paperclip (or scroll down to the Manage Attachments button), browse to the required file, and then push the Upload button.
From xladept
Works like a charm!![]()
If Range("F62") <> "" Or Range("H62") <> "" Then If Range("H62") <> "" Then 'check if If B65<>"" are filled and if not - enforce filling it If Range("B65") = "" Then MsgBox "B65 is empty - fill it!", vbExclamation, "Missing Entry" Exit Sub End If: End If 'action if identified as right Else 'action to fill at least one MsgBox "Both F62 AND H62 empty - fill one!", vbExclamation, "Missing Entry" Exit Sub End If
Thanks again!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks