Help with Input Box dependent on the current date

andyholford

New Member
Joined
Jul 21, 2014
Messages
4
Hi all,

Apologies if this has been answered. I searched a lot but cannot find anything...

I'm filling in lots of data that will be updated monthly. The data is structured with the months of the year in columns across the top. As there are quite a few tabs and lots of automatic calculations and I don't want somebody inexperienced putting the latest monthly data in the wrong place.

Therefore, I want to create a button which when pressed by the user opens up a series of input boxes. Similar to this http://www.mrexcel.com/forum/excel-questions/512739-use-input-box-fill-cells.html.

However, because I have lots of monthly columns, it needs to only input data into the previous month's column. And even better, if data already exists in that box, it would be amazing if it could flag this up to the user...

It would also be good to have a cancel button there as well.

I'm hoping this is all pretty simple :S

Example form:
ABCDEFG
1AprMayJunJulAug
2Website Visits10002000
3Time on Site210207

<tbody>
</tbody>

In this case I'd want a box that would enter details in Jun as its the last full month...


Thanks in advice for any advice or help
Andy
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
This kind of question raises all sorts of usability issues that you have to consider.

First, how many pieces of data will your users enter at once, a few, 10+, hundreds? If it's a lot of data, the normal Excel interface is the fastest, most user-friendly way to enter the data. If you start restricting that, and force your users to enter values by hand, one at a time (versus maybe they were copy/pasting before), they might not be too happy. If you use input boxes then this has to be done serially, one at a time. Will the user lose their way/place if they get distracted?

One option is to create a UserForm, and manually draw out all the input boxes all at once. Takes a lot more VBA code on your part, but you'll get the control you want.

Another option is to use Excel normally, but create an "input section" with just one column, let the user enter the data, then use VBA to assign that to the correct month column.

Another option is to use VBA to hide/unhide monthly columns that you don't want the user to see.

All of these options require one piece of data: the current month you are working on. So regardless, somewhere on an "admin" sheet you will need to specify the correct month #.

Can you clarify how many data entry operations we're talking about?
 
Upvote 0
This kind of question raises all sorts of usability issues that you have to consider.

First, how many pieces of data will your users enter at once, a few, 10+, hundreds? If it's a lot of data, the normal Excel interface is the fastest, most user-friendly way to enter the data. If you start restricting that, and force your users to enter values by hand, one at a time (versus maybe they were copy/pasting before), they might not be too happy. If you use input boxes then this has to be done serially, one at a time. Will the user lose their way/place if they get distracted?

One option is to create a UserForm, and manually draw out all the input boxes all at once. Takes a lot more VBA code on your part, but you'll get the control you want.

Another option is to use Excel normally, but create an "input section" with just one column, let the user enter the data, then use VBA to assign that to the correct month column.

Another option is to use VBA to hide/unhide monthly columns that you don't want the user to see.

All of these options require one piece of data: the current month you are working on. So regardless, somewhere on an "admin" sheet you will need to specify the correct month #.

Can you clarify how many data entry operations we're talking about?


Thanks Chris. There are approx 8 tabs with 10-20 inputs. Each will be completed by someone else potentially.

I have the month in as there are other calculations using it.

Thanks again
 
Upvote 0
What do you think about hiding un-needed months, either showing just the one month in question, or maybe hiding the future months?

Regarding input boxes, since they are done one after another, to me, it doesn't sound like a good solution to ask your user to do this 10-20 times in a row. What if they mis-type item 15? Then they have to start back over at #1.

If it was me:
I would go with visually hiding/altering the worksheets first
Second choice I would have one single data entry sheet then use VBA to send that data to the correct sheets+cells
Third choice I would build a userform (lots of VBA code and complexity on your part)

But, if you REALLY like input boxes, then yes, that can be done.

What are you thoughts?
 
Upvote 0
What do you think about hiding un-needed months, either showing just the one month in question, or maybe hiding the future months?

Regarding input boxes, since they are done one after another, to me, it doesn't sound like a good solution to ask your user to do this 10-20 times in a row. What if they mis-type item 15? Then they have to start back over at #1.

If it was me:
I would go with visually hiding/altering the worksheets first
Second choice I would have one single data entry sheet then use VBA to send that data to the correct sheets+cells
Third choice I would build a userform (lots of VBA code and complexity on your part)

But, if you REALLY like input boxes, then yes, that can be done.

What are you thoughts?

Hi Chris,

Ive vey given it some thought and asked the end user and you Re right to be honest highlighting and protecting the cells for them to complete will be the best option.

Thanks for your time and consideration on this.

Andy
 
Upvote 0
Definitely much easier to go with a less intrusive solution. Now, you can still use VBA to do the setup grunt work for you. How about when you set the month on your main sheet, it automatically protects and highlights the correct columns on each tab?
 
Upvote 0
No, just tell me what you'd want to happen. It can be any combination of things: hiding columns/rows, protecting cells, etc.

Also specify what you want the trigger to be: a button, or every time you change your month in the main setting, etc

Next, we have to confirm your column layout on each sheet. Ideally they all are the same, maybe January always starts in cell B2 for example

Finally, we need to identify (by name), any sheets that don't need this formatting automatically applied
 
Upvote 0

Forum statistics

Threads
1,214,907
Messages
6,122,185
Members
449,071
Latest member
cdnMech

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top