Try this
Sub check()
Dim Birth As Range, PANo As Range, UserInput, Arr
Set Birth = [G2]
Set PANo = [j2]
If IsEmpty(Birth) Then
Birth.Interior.Color = 255
Birth.Interior.Pattern = xlSolid
If MsgBox("Birth Date is empty, Do you want to enter data now
?", vbYesNo + vbQuestion) = vbYes Then
UserInput = Application.InputBox("Enter the Bith Date using
format DD/MM/YYYY", "Birth Date", Type:=2)
If Not UserInput = False Then
Arr = Split(UserInput, "/")
Birth.Formula = "=DATE(" & Arr(2) & "," & Arr(1) & ","
& Arr(0) & ")"
Birth.Interior.Pattern = xlNone
End If
End If
End If
If IsEmpty(PANo) Then
PANo.Interior.Color = 255
PANo.Interior.Pattern = xlSolid
If MsgBox("PANo is empty, Do you want to enter data now ?",
vbYesNo + vbQuestion) = vbYes Then
UserInput = Application.InputBox("Input PANo !", "PANo",
Type:=1)
If Not UserInput = False Then
PANo = UserInput
PANo.Interior.Pattern = xlNone
End If
End If
End If
End Sub
On 02-09-2013 12:13, ITP Abdulgani Shaikh wrote:
Please guide me to sort out this issue.
On Sat, Aug 31, 2013 at 3:32 PM, ITP Abdulgani Shaikh
<itpabdulg...@gmail.com <mailto:itpabdulg...@gmail.com>> wrote:
Dear Excel Masters,
I want macro for following :
01. There are two cells in attached sheet G2 & J2. When I will
run macro it should check that whether values are entered in these
both cells. If any one or both cells are blank, cell should be
RED and give message that values are not entered.
and then it should ask Do you want to enter data now, if yes input
box for entering value.
02. This sheet is used by me for calculating monthly tax from
Salary of employees. In each file there are number of sheets
having details of TDS to be deducted from salary of each employee
(Pl.see cell Q46 to U46). Number of sheet may change based on new
joining or retiring employee. Every month I have to update
manually "*Challan Detail*" sheet.
=> Is it possible to update "*Challan Detail*" sheet using macro
for all months.
=> Is it possible to update data of particular month "*Challan
Detail*" sheet using macro.
Please guide.
Regards
--
Shaikh AbdulGani A R
ITP, STP, TRP, STRP
--
--
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be?
It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
https://www.facebook.com/discussexcel
FORUM RULES
1) Use concise, accurate thread titles. Poor thread titles, like
Please Help, Urgent, Need Help, Formula Problem, Code Problem, and
Need Advice will not get quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security
measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.
NOTE : Don't ever post confidential data in a workbook. Forum owners
and members are not responsible for any loss.
---
You received this message because you are subscribed to the Google
Groups "MS EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/groups/opt_out.
--
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
https://www.facebook.com/discussexcel
FORUM RULES
1) Use concise, accurate thread titles. Poor thread titles, like Please Help,
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.
NOTE : Don't ever post confidential data in a workbook. Forum owners and
members are not responsible for any loss.
---
You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/groups/opt_out.