Solved

Formula based on user input

Posted on 2014-02-13
5
230 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

746 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now