Solved

Formula based on user input

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

PaperPort has a feature called the "Send To Bar". It provides a convenient, drag-and-drop interface for using other installed software, such as Microsoft Office. However, this article shows that the latest Office 2016 apps (installed with an Office …
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

920 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

15 Experts available now in Live!

Get 1:1 Help Now