Greetings ![Big grin :biggrin: :biggrin:](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
I have created a popup running off a commandbutton as per follows:
Leveraging off this, is it possible to have a user enter a staff id number which would then go to the worksheet, search and add up all 6 leave types and then provide another popup with the results? I have attempted to come up with a solution and tried to write the formula to replicate results in a table using SUMIF/SUMIFS and encountered problems due to a test in column B followed by multiple tests in Column E, to then add up data in Column H of qualifying matches to get a total.
I hope this image makes more sense if I have confused you.
So when the user clicks "Member Report", this popup shows:
What I am hoping to achieve?
When a staff ID is entered, for example '4444' as per the data above and 'OK' is clicked, I get another popup showing Total Hours of all leave types even if zero:
Sick: 8
Carers: 0
Family: 0
Injury: 0
Urgent: 8
Other: 0
Would this require a form design or can it be achieved in a standard popup similar to that above?
I am still very much at basic level in Excel so hope someone can help me out. Your assistance is greatly appreciated!!
Scott
I have uploaded a working copy of the file
http://s000.tinyupload.com/?file_id=90446930089702635196
I have created a popup running off a commandbutton as per follows:
Code:
Private Sub CommandButton2_Click()
Dim myReport As Variant
myReport = InputBox("Enter ID Number:", "Generate Leave Report")
End Sub
Leveraging off this, is it possible to have a user enter a staff id number which would then go to the worksheet, search and add up all 6 leave types and then provide another popup with the results? I have attempted to come up with a solution and tried to write the formula to replicate results in a table using SUMIF/SUMIFS and encountered problems due to a test in column B followed by multiple tests in Column E, to then add up data in Column H of qualifying matches to get a total.
I hope this image makes more sense if I have confused you.
![qn9375.jpg](/board/proxy.php?image=http%3A%2F%2Fi62.tinypic.com%2Fqn9375.jpg&hash=2ea990d18276b7254e6b0d02bf26e749)
So when the user clicks "Member Report", this popup shows:
![2yzg6s7.jpg](/board/proxy.php?image=http%3A%2F%2Fi58.tinypic.com%2F2yzg6s7.jpg&hash=8d606504c6fe76547b89671426e0790e)
What I am hoping to achieve?
When a staff ID is entered, for example '4444' as per the data above and 'OK' is clicked, I get another popup showing Total Hours of all leave types even if zero:
Sick: 8
Carers: 0
Family: 0
Injury: 0
Urgent: 8
Other: 0
Would this require a form design or can it be achieved in a standard popup similar to that above?
I am still very much at basic level in Excel so hope someone can help me out. Your assistance is greatly appreciated!!
Scott
I have uploaded a working copy of the file
http://s000.tinyupload.com/?file_id=90446930089702635196
Last edited: