Solved

Formula based on user input

Posted on 2014-02-13
5
232 Views
Last Modified: 2014-02-13
Is there a formula or vba that will take user input from a couple of cells and use a particular formula in another cell chosen based on the user input?

For example, if user enter Week # = 1, # of Days = 100, then Projected Month End needs to calculate 100/95.  But if user enters Week # = 2, # of Days = 90, then the Projected Month End needs to calculate 90/80.

Month Goal            
Week #            # of Days
Projected Month End
0
Comment
Question by:fabi2004
  • 3
  • 2
5 Comments
 
LVL 23

Expert Comment

by:NBVC
ID: 39856952
Are those the only options?  Can you explain the logic on how the PME is calculated?
0
 
LVL 1

Author Comment

by:fabi2004
ID: 39856997
It's hard to write down everything I'm trying to do with the spreadsheet all in one question.  So I was just going to post it in parts in seperate questions.

Basically, I want a dialog box type of app that a user can quickly view projected end of month sales.  The projection formula is easy.
If it is the beginning of the month (BOM) then the current days are divided by .96 to predict the end of month days.  One week out, projected = current/.93.
2W = current # of days/.92
3W = curret/.88
4W = current/.84
5W = current/.80
6W = current/.76
7W = current/.71
8W = current/.65
9W = current/.60

I know I can use nested IFs in the Projected Month End cell.  I was thinking there might be a more elegant way of programming it using VBA.  I would hate the IFs formula to get accidentally overwritten.
0
 
LVL 23

Accepted Solution

by:
NBVC earned 500 total points
ID: 39857018
If you really want VBA, then I will leave to another expert who is more VBA proficient than I....

If you were to use formulas, I would suggest some sort of lookup table show the weeks out number vs. the denominator number, so you would have something like:  

=current/VLOOKUP(A1,mytable,2,0)

where A1 contained the lookup value (week numbers out) and mytable is your lookup table...
0
 
LVL 1

Author Comment

by:fabi2004
ID: 39857035
Good option.  Thank you.  I think I will use the VLOOKUP function instead.  It will be easier to modify the percentages later on if they have to be changed.
0
 
LVL 23

Expert Comment

by:NBVC
ID: 39857101
You are welcome.
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question