Validation Vs form control - excel

My question wasn't at all specific but i wanted to gauge user insight, I was looking into building a excel / sql DashBoard which users can use based upon their credentials being within the sql table, but the first hitch i wanted to discuss is drop down boxes and what would be a better option, after data validation method i choose Active X instead, to which a VBA code on opening the workbook, would get the list which is refreshed based upon the user credentials.
Whats the best type of validation / drop down box to use, i know the usability changes Eg Font size but wanted advise please.

Both have different usages and benefits. What is your use case?
Validation is limited in functionality but can offer a lot in many cases. It doesn't need explicit macro permissions.
VBA code will always require macro permissions etc.
If all you need is a drop down, use validation with named range. If you want further functionality, use VBA.

Related

Scenario manager: can you create scenarios in a table, and get the Scenario Manager to read from there?

Microsoft's official site has an explanation on how to use scenarios in Excel.
If you name the input cells, the scenario manager will show the name, so it's easier to remember that $C$5 is, say, the price.
My question is: is it possible to set up the scenarios in a table somewhere in Excel, and get the scenario manager to read from there? Setting multiple scenarios in the scenario manager is very fiddly, time-consuming and error-prone, especially when the inputs are linked - e.g. setting 10 scenarios where each scenario is an x% change from the previous.
Any suggestions?
PS I know all these things can be done very easily in a scripting language like Python or R, but in this very specific case the calculations are not too complex and the file needs to be shared with other people, so I must use Excel.
VBA would be a last resort because some of these people have VBA disabled by default.
Edit
To clarify, what I'd need is a way to create a table like this below, where those in blue are the inputs, and those in grey are the outputs. I have put together a banal example below, along the lines of the example in the VBA macro answer given below, but the general idea is:
define a number of scenario as the combination of multiple inputs (more than 2) ;
create a table showing, for each scenario, the inputs and some key outputs;
note the table doesn't have all the possible combinations of all the inputs, like the macro given in one of the examples - that would be too much and wouldn't be very readable.
I could put together a quick VBA script that changes the inputs in the model, reads the result and creates the table, but I was wondering if there is a better way - VBA is typically not very robust, in the sense that just changing the location of one cell can often mess things up. I usually avoid Excel for the more complex models (this would be banal in any scripting language), but this I have to do in Excel.
EDIT #2:
Trying to further clarify what I have in mind, I have put together the screenshot below. Each output is the result of many different calculations, and CANNOT be calculated as a small, simple formula - if it could, I would not have any issue, of course!
My issue is that:
- if I change an input, then all the many many calculations occurring behind the scenes change
- the outputs are read from all those calculations
- I cannot use two-way what-if tables
If even this is not clear, the only other thing I can try is to upload an Excel file, which is generally discouraged on SO.
Scenario Manager is a built in function with it's own GUI.
For this reason, the function will be limited in what it can call (only data entered in the GUI)
VBA will allow you to manipulate this data, telling it where to pull the changing values and what data to change it by
So the answer for your specific query:
Can I use Excel without VBA to perform Scenario Manager tasks not set by the GUI?
No.
But it doesn't mean fiddling with the Manger itself would be horrendous. There are ways to teach and learn with it, but also if you save a macro enabled document, users should be able to turn the macro on with the click of a button - so VBA can be an option too
I hope this helps?

Turning Excel project into Web app

I've created a proof of concept (PoC) to test on users for a project. The wookbook is made up of a number of worksheets - which refer to each other - with LOOKUPS throughout.
I want to share the PoC with a prospective user but don't want to share the full spreadsheet file and only want them to be able to add to certain fields to test functionality. They will add text to certain fields which will then refer to different parts of the spreadsheet and make calculations based on those inputs.
If I publish as a web app they will have full access to the formulas (my secret sauce) which I don't want.
Someone suggested Google sheets. I've tried importing to Google sheets and publishing there but none of the formulas port across and as such none of the buttons I've created work.
Can anyone help?
Here's what I would do. First, click the select all arrow at the top left of your sheet, right-click somewhere on the sheet, click Format Cells, then Protection, and lock and hide everything. Now go to your sheet and click the individual cells you need unlocked for testing purposes (perhaps color them a different color as well). Now lock your sheet.
A word of warning, though. Worksheets can easily be unlocked by someone who knows the workaround (or someone willing to spend ten minutes on Google to find it). If possible, turn your formulas into UDFs (they're typically reusable that way too, so it's an added bonus), and then lock your code down. You can also convert them into an add-in, making them a bit more secure as well.
Ultimately, I don't believe a web app is a viable option if you don't have the skills or know-how to build one. Excel is extremely weak when it comes to protection, and if you're not willing to trust your consumer and/or not willing to make your formulas insanely complicated (to a point where they're near impossible to breakdown by anyone other than the creator), then you need to rethink some things.
Unlock the cells that you want the users to be able to enter data into and then protect the entire book. Enable "Lock project for viewing" to protect your code. Make sure you use a good password that is 16 characters in length.
...

developing a front end app using excel spread sheets

We get at least 20 queries a day on an average from our clients, where in we have to open and look at data on 4 to 5 Excel sheets to answer them. questions such as what is my available balance, am i eligible for this etc. All our clients are connected to our intranet and have access to internet. I was wondering is there a way where we can develop a front end app (do not have budget for MS VB or any other) either in excel or any other to connect these 4 to 5 excel sheets to retrieve the data in response to queries (e.g. using perhaps some if and true/false queries). I am not an advanced Excel user but would be great for an advice from tech experts.
Yes, i wouldn't call it an app but consider a worksheet like a dashboard. You can have a cell for entering client name, and then use formulas to look up relevant information of the name entered. The cosmetic and arrangement of the information retrieved and published on the dashboard is up to you and of course do consider investing some time in the looks and feel if you want to enjoy using it.
Things you may consider are:
Place the files are kept and file name convention
because your dashboard will look for information in external workbooks, ensure that the files are saved in a fixed directory and have a specific file name. if the external files are updated from time to time by other folks, let them know too that they have to save it in a particular folder with a specific name format.
Properly structure the source of data
Format you data source into tables so that it is easier for use with formulas. Throw away titles if any in the data source worksheet. Use tools like "Table" under the INSERT tab. When data are properly organized, they can be easily looked up using formulas such as VLOOKUP, SUMIFS, MATCH-INDEX, and COUNTIF.
Be good with formulas
Since we have no budget for VB, then good formulas will be needed. There are plenty of help on the internet for this I think you'll have no problem in it.
Employ sanitary check measure
It is difficult to tell if our formula isn't functioning properly when we have no counter check measure. Certainly you want to give your clients accurate information. One way to check is, think of alternative ways to get the information wanted and check if it matches to the first way. Another way is to retrieve a sequence of related information to be put on the dashboard, then do simple calculation to check if the numbers add up. Use conditional formatting to highlight errors if necessary.
I think these are key consideration, there may be more, but this is what i can think of for the moment.

Exporting Access data to pre-existing and pre-formatted Excel spreadsheets

Good day all,
I am very new to Access and VBA, so some of these questions may seem elementary, but any help offered would be greatly appreciated... I am a member of a recruiting organization, and am trying to build a database system that will greatly increase our administrative efficiency and quality of life. My organization insists on the use of Excel spreadsheets that are supplied to us to document our efforts and for our reports, thus ruling out the possibility of using the reports from Access. I have the underlying database pretty well ironed out, but what I need help with is taking that data and putting it in specific cells within an existing excel spreadsheet. Specifically, what steps do I need to tell access to do, how to select the appropriate worksheet, and how to select individual cells to send data to. I also need to link all of this to a button on a form labeled, say, "Generate Applicant Log"... Additionally, I would like both the database and all applicable template spreadsheets we would need to be located in the same folder that I can lock, so that I can send the whole folder to another user and all necessary files are included, but they can't get into the folder to mess with stuff. I am concerned this will affect whatever coding I would use due to the changing file path names from user to user, so any help in figuring out a way to tell access how to find the spreadsheets relative to where the database is so it always works no matter who's computer the folder is on or where it is at in the same computer, would also be greatly appreciated... I apologize in advance for the length of this inquiry, and graciously appreciate any help in this matter! Thank you for your time!
Rather than send data from Access to Excel, it is easier to pull data into Excel from Access. In Excel, on the "Data" tab select "from other sources" and build a Microsoft Query. I like to put the data into a spreadsheet and link the data into the sheet the user will see - I hide the original sheet. This way you can put all of the data into the hidden sheet, and then move things for the reports you need.
Using this method, I bring measurement data from a database, show it to users that need to review it, and run VBA routines to evaluate the data and highlight the interesting / important data. I also keep the users out of the original database.
I have my database on a server and I cannot offer help on sending the database and files to the user. I just send the file - they have access to the server and the data is refreshed each time the spreadsheet opens.

Can you pull data from a spreadsheet that is security protected?

If our finance department wants us to create a web app that pulls data from a spreadsheet calculation, based on user input, but also want that spreadsheet to be private from all developers working on the app, is this possible?
How do companies launch an app with sensitive information that they want to protect?
Can you access data from an excel spreadsheet that is security protected?
Easiest way to develop such an application (this is a high level answer of "how do develop an app when you can't see the classified or protected data" not "how do i make a web portal with an excel backend") is to get "dummy" data.
You make the dummy data just as protected, but give the developers the ability to see the data on the other side of the wall. You make sure the datatypes are the same (the only thing different should be values) and go from there. That's the easy way. After the app is developed with the dummy data, it's deployed and people with access to the data "connect the pipes" and away you go.
As to using an excel sheet as a backend to a website..please look into MySQL or MSSQL or some other database solution. The developer coming after you will thank you.
If you can't because of management..ripping open an excel file directly is not for the faint of heart, but microsoft does provide an api to access the insides. I've done it once..and don't remember how to off the top of my head, but perhaps someone more skilled remembers the api. The easier road is to have that workbook output to CSV (which is easily parsed).
I would recommend the excel workbook update a table that you apply whatever security scheme you need to on. Also you can put the workbook in a location that only those with proper rights can access.
If the user input is limited to a a field or two and the values are for easily determined values that doesn't span a huge range, then create a lookup table. In this table, you would store the results for all possible combinations of input values. This would allow for you to not putting the Excel spreadsheet on the Web server.

Resources