?
Solved

Formula based on user input

Posted on 2014-02-13
5
Medium Priority
?
236 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Ever wonder what it's like to get hit by ransomware? "Tom" gives you all the dirty details first-hand – and conveys the hard lessons his company learned in the aftermath.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

800 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