Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default MsgBox Display

I would like to have a message box display under these conditions.

Column A = Job Status
Column B = Date Completed

If column A = Done and Column B does not have a date of completion then I
would like to have a msgbox pop up and tell the user they need to put a
completion date in column B.

Thank you
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default MsgBox Display

Use data validation on A2 with a custom value of =B2<"", assuming row 2,
and an appropriate error message

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Michael S." wrote in message
...
I would like to have a message box display under these conditions.

Column A = Job Status
Column B = Date Completed

If column A = Done and Column B does not have a date of completion then I
would like to have a msgbox pop up and tell the user they need to put a
completion date in column B.

Thank you



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default MsgBox Display


Very simply:


Code:
--------------------
Sub FillDateCompleted()
Dim NumRows As Long, x As Long
NumRows = Cells(Rows.Count, "A").End(xlUp).Row
For x = 1 To NumRows
If Range("A" & x) = "Done" And IsEmpty(Range("B" & x)) Then
Range("B" & x) = InputBox("Enter the Date Completed")
End If
Next x
End Sub
--------------------


You can use data validation to ensure a valid date is entered and
format the result on your sheet if you like as well.
You can also have the affected range be highlighted so the user more
clearly knows what job they are entering the completion date for.
You can also add an if statement after the inputbox assignment that
makes sure they entered a date.
But this should get you started

HTH


--
bhofsetz
------------------------------------------------------------------------
bhofsetz's Profile: http://www.excelforum.com/member.php...o&userid=18807
View this thread: http://www.excelforum.com/showthread...hreadid=379821

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to display remaining txt file which overflowed MsgBox display? EagleOne Excel Discussion (Misc queries) 1 November 2nd 06 01:10 PM
Display of $ in Msgbox David Excel Programming 2 September 8th 04 09:38 AM
Display MsgBox thru automation Per-Olof Excel Programming 1 January 13th 04 07:39 AM
DISPLAY RANGE AT MSGBOX GUS Excel Programming 2 September 25th 03 08:38 PM
Specify font for MsgBox display? shockley Excel Programming 1 September 11th 03 01:50 PM


All times are GMT +1. The time now is 09:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"