Different Calculations Based On Variable Inputs

Feb 15, 2009

If I input any FX pair (Column B) without ???JPY in it, then the formula in Column K produces the correct result. Formula is: eg: If Column B = EURUSD pairs and the like: =IF(C3="L",F3-E3,IF(C3="S",E3-F3))*10000.

This formula will produce a +ve or -ve result in points (PIPS) based on the values of E3 and F3. (eg. E3 = 1.2800 & F3 = 1.2750. If C3 = L then the result is -50. Conversely if C3 = S then the result is 50.)

When I input the JPY pairs in Column B, I need the formula to calculate the same way but multiply by 100 (not 10,000). This is because all non JPY cross pairs have 4 decimal places and JPY cross pairs have 2 decimal places. (eg. 1 PIP in EURUSD = .0001, 1 PIP in USDJPY = .01).....

So if Column B = USDJPY the formula would need to be: =IF(C3="L",F3-E3,IF(C3="S",E3-F3))*100 . Have tried many combination's of the IF function but am now starting to think this is not quite the right formula for this situation. Attached is a sample of what I am trying to achieve. The formula would need to incorporate any/all variations in currency pairs as listed in the attached sample.

View 2 Replies


ADVERTISEMENT

Multiple Options Cell Values Based On Multiple Criteria Variable Inputs?

Mar 18, 2013

I maintain the data flow at my work. We send and receive the data using excel files with specific formatting that I then upload to the database. Each time I send or receive the excel file I must log them, this is what my code question refers to.

I use RDBMerge to merge all the contents of the 100 plus excel files into one worksheet. The first part of the macro cleans up the merge data for use in the log (i have attached an example of the clean data and finished log).

The blue shaded area of the "Raw_Data" is what the clean data looks like, the yellow column is what current macro records for each record.

As you can see by the example the Raw_Data is only two files LL_LLL_BOB_ToLLLLL_20121228_01 & LL_LLL_BOB_ToLLLLL_20121230_01, each with more that one record.

The log code in column "H" Is based on this criteria:
First Letter of the Unique ID in column "E" - O, M, or L
Program Type in Column "F" - U or R
1. O-U = U
2. O-R = RU
3. M-U = U2
4. M-R = R2U
5. L-R = R

You will note that Columns G-R of the "Log Sheet" correspond to the "Record Type" found in Column "G" of the "Raw_Data" sheet.

This is the area where my skill at using scripting dictionaries fails.

The results for the log list each file only once, but the log code for each corresponding "Record Type" in columns G-R of the "Log Sheet" must contain each unique instance of the code. In other words

if LL_LLL_BOB_ToLLLLL_20121228_01 contains an O-U with an "A" Record Type and an M-R with an "A" Record Type; then, on the log sheet there needs to be the codes "U/R2U" in the cell intersection of the LL_LLL_BOB_ToLLLLL_20121228_01 record row and "A" column (which is column "G")

So, If the File contains one of each code for each Record Type the corresponding cell must house one of each code separated by a "/" without any spaces. This means the cell value could no code, or one code and all the variations in between to all five codes. Also, for ease of human reading the log codes should be concatenated in the 1-5 order that I listed them in (U/RU/U2/R2U/R)

Here is my code so far.

VB:
Option Explicit
Sub test()
Dim dic As Object, a, i As Long, rng As Range, e, w, n As Long
Set dic = CreateObject("Scripting.Dictionary")

[Code].....

View 1 Replies View Related

Conditional Formulas-to Get A Spreadsheet To Automate Calculations Of Unit Costs Based On Variable Packaging Names

Dec 1, 2008

I am looking for a way to get a spreadsheet to automate calculations of unit costs based on variable packaging names.

I have a series of packages that are denoted by text phrases. Examples:

4/6/12
2/12/12
6/4/12
18/12
24/12

For our purposes let's say the package names above will always be in column A. Column B contains the frontline price of a case of product represented by the phrase in column A. Column C will contain the cost per unit of product - this is obtained by dividing column B by the number of each package arrangement that can be found in one case. Most of the time the number of package arrangements per case is denoted by the very first number in the package name (ie, 4/6/12 would be 4). This won't always be the case though (18/12 would be a package arrangement of 1).

I am looking for a way for the spreadsheet to do all of the following and return the results in column C: if the package name contains "4/6/12", divide column B by 4; if the package name contains "2/12/12", divide column B by 2; if the package name contains "6/4/12" divide column B by 6; if the package name contains "18/12", divide column B by 1; if the package name contains "24/12" divide column B by 24.

View 9 Replies View Related

User Defined Function With Variable Inputs

Nov 16, 2007

I want to build something like this....

function getdb(a,b,c,d,e,f........x)
getdb = a & "," & b & "," & c &....& x
end function

where x is the total number of variables.

So if in excel, I run getdb (a,b) that it will know that the funciton has only 2 variables but if i run getdb(a,b,c,d,e,f,g,h,i,j) that it knows.

I am trying to avoid getdb(a,b,,,,,,,,,,,,,,,,,,,) as I bet the user will not know how many ","s to use

View 9 Replies View Related

Variable Commission Rate Calculations?

Mar 29, 2012

I need a way to calculate commission for my sales reps. The commission is based off a calculated value in H39 of a sheet that I have developed.

They get 7.5% of the value when between $1 - $100,000, example: sales of $50,000 = $3,750 in commission.

If the value in H39 is > $100,000 but $250,000 but $500,000 they get 7.5% on the first $100,000 plus 5% on the amount between $100,001 and $250,000 plus 3% on the remainder between $250,001 and $500,000 plus 2% on any amount >$500,000 example: sales of $800,000 = $7,500 (7.5% on first $100,00) plus $7,500 (5% on the next $150,000) plus $7,500 (3% on the next $250,000) plus $6,000 (2% on the sales >$500,000 for a total of $28,500.

View 5 Replies View Related

Variable Number For Use In Formula Calculations

Jun 19, 2008

I have a formula that will be used by others to obtain a certain result by altering a number in the formula. What I would like to do is make that number obvious as the one that can be changed. The formula reads - "=(M48+P48+Q48)*0.08453-(((J48+K48)*$K$4)*0.1)" -what I would like to do is color the 0.08453 in the Formula Bar so it stands out.

View 4 Replies View Related

Values Based On Three Inputs?

Jan 27, 2014

Trying to look up values based on three inputs:

Attached is the file:

Month Input, Column Input and Network Input are changeable based on user input, I am trying to get the desired output based on selection from A20, B20, C20 into cells G20, G21, G22 from row number 2 and corresponding values in H20, H21, H22 from the corresponding row based on the selection.

I have populated an example in the attached file.

View 14 Replies View Related

Returning A Value Based On 3 Inputs?

Feb 27, 2014

I have 3 tables as per the attached samples (there is more but this is a sample for now).

In the table below these I have what I am trying to do. There is the manual input and the auto output based on the inputs.

e.g. if I input 12 in size, ball in type & A01B in piping class I hope to get the following output 20, 35, 51, 67, 83, 99 in the respective columns.

The formula needs to work across all three tables at the same time.

View 13 Replies View Related

Insert Columns Based On Inputs

Aug 15, 2008

This is for my fantasy football league, so perhaps being familiar with fantasy football will be of help. It's somewhat complicated, so I'm just going to explain what I would like to do: Upon opening the Excel file, there will be a few questions. The first will ask what type of draft, with just two choices, A or B. Below that, it will have inputs asking how many teams, how many players per team, and, if option B was chosen, how many dollars per team. After answering the questions, there should be a button that will "generate" what I'm about to describe.

Choosing option A or B will result in two completely different sheets: -Option A will have X columns for the number of teams entered, and Y rows for the number of players per team. If possible, something will pop up allowing the user to input each team name.

-Option B will be a bit more complicated. I have a template of what one column will be for each team, and would need to have that repeated for the number of teams entered. Additionally, the number of players per team and dollars per team will need to be placed into an existing formula that will perform certain calculations. And, if possible, the number of players per team will alter the column template if the number is over a pre-defined number. And, like the previous option, it would present a pop up allowing the user to input each team name.

I apologize for the length of this question, and while it is too extensive to ask someone here to do, I would like to know what I can expect if I try to achieve this. Will I need to know programming code? Can you point me to some articles that will help me in terms of turning an inputted number into a spreadsheet with that number of columns after hitting a "submit" button?

View 2 Replies View Related

Conditional Formatting Based On Multiple Inputs?

Feb 19, 2013

I'm working on a fairly complex spreadsheet where I want to pull conditional formatting into an entire row. I have a column in tab1 where I have a bunch of beer styles listed. On tab2, I have a 2 columns: a complete list of styles with a 'yes' or 'no' in the next column based on certain criteria. What I'd like to do is have the column in tab1 highlight if that style in tab2 has a 'no' in the column next to it.

View 3 Replies View Related

Reset Dropdown Lists Based On Other Inputs / Cells

Jul 1, 2009

Trying to create a dynamic costing spreadsheet, where the user has to make multiple selections from many dropdown lists, all of which end up showing a total cost.

So far I have managed to create relatively dynamic lists, so that the choice in one cell will dictate what options are available in the next.

But if a user selects an options form all the dropdowns, and then decides to go back and modify a previous option to something else, the effected dropdown lists do not change until you click on the drop down arrow again and see the options available have changed.

Let me try and simplify...
'Menu 1' has two option: 'A' and 'B'.
If 'A' is chosen, then the next menu, 'Menu 2', will have options '1' and '2'.
If 'B' is chosen from 'Menu 1', then the options in 'Menu 2' will be '3' and '4'.
Lets say the user chose 'A' from 'Menu 1' and then '1' from 'Menu 2'... AND THEN went back and changed their choice in 'Menu 1' to 'B'....
'Menu 2' will still be displaying '1', even though the options are only '3' and '4'.

Can I make the dependant menu's either reset or blank or highlight to show that a change made somewhere else has made them currently invalid

View 10 Replies View Related

Changing Fill Colour Of Cells Based On Other Cell Inputs

Jun 20, 2014

I have a calendar set up with dates going along P6:CU6. Column C9:C27 has various status' for the job such as "Complete" or "In Progress" etc. Next to that in rows D and E I have start and end dates for the job. What I am trying to do is change the fill colour of the empty cells that are in line with each job, so that between the correct dates they are the corresponding colour to the status. So a complete job on row 9 that started on 26/05/14 and finished on 28/05/14 would have three green cells along Q9, R9, and S9.

I have tried an IF/AND/OR statement which looks like this:

=IF(AND(Q6>=D9,Q6<=E9),OR(IF(C9="Planned","P",""),IF(C9="In Progress","IP",""),IF(C9="Late","L",""),IF(C9="Complete","C","")),"")

I am getting a #VALUE! data type error, I have tried reformatting the cells to various date formats but no luck so far. This could be because my dates are set up as =P6+1 etc. but I am not sure. The error only occurs when the cell falls within the dates, otherwise it remains blank.

I intend to hide the value in the cell and use conditional formatting to change the cell colour based on the hidden input.

Once this is working I also need to take weekends into account, column G has any 2 value combination of Y and N to say whether the employee is working Saturday, Sunday or both. Row 7 has a "1" value underneath every Saturday and a "2" underneath every Sunday. I can imagine how this would work but combining it with the above formula could be complicated.

View 1 Replies View Related

Vlookup On Dates And Generating Date Range Based Upon Inputs

Feb 13, 2014

I am attempting to find a way to search through a database I created based upon every day of the year. My goal is to have a user input a beginning date and end date for a trip, then my functions will return the range specified with each day and it's individual temperature average (in my database).

I also need generating the dates between the start and end dates that are entered by the user. I was considering combining Days360 with an Hlookup that searches through a massive sheet with all the dates for the upcoming year and then going down 1 in the column for the difference in the dates in each column.

Vlookup Help.xlsx

View 5 Replies View Related

Add New Data To Existing Cell Based On Multiple Selective Inputs?

Apr 1, 2009

I have a spreadsheet of courses required to reach a certification. On this spreadsheet I have listed the number of hours required for each course in one column, and how many hours I have accrued in an adjoining column. Not all the hours will occur at once, so I tend to bound from cell to cell adding hours in small amounts. What I am trying to do is create a macro that will allow me to add to the existing number of hours to the newly accrued hours, without typing over what is already there.

For example…Class 1 requires five hours total, and I have two hours accrued. If I accrue two more hours (for a total of four hours) I want to update cell E2 without going in to this cell manually and changing this number. I would like to enter the additional two hours in a text box or similar function, and have that function update E2. To add to the level of difficulty, there are four levels of class. This means not only do I need to be able to select which class hours need updated, but which level of class. I have attached the spreadsheet I am working with to try to make things a little clearer.

View 2 Replies View Related

Filter Based On 2 Inputs Or Option And Copy The Date To Next Sheet One After The Other

Sep 25, 2008

I have some data in sheet1 with 10 columns and 5000 rows.
I want to filter the data with 2 criterios.

When I go to 4th column and Click custom filter, I will give one criteria and select "or" and give another criteria. SO I will get the result in sheet1, I need to copy the data and paste the same in sheet 2 with the header.

The problem is, I need to filter more than 20 times giving the criteria and copy the result and paste in sheet 2 one after the other.

So i need a macro to solve this time consuming work.

I just paste the two criteria either in a text box or some cells and run the macro. the macro has to filter the data in sheet1 based on my input.( that is criteria1 or criteria 2) and the result should be pasted in sheet2 with the headers.
Again I delete the values in my input cell, and paste the new values, and run the macro, that result should be pasted after the first result, with the header. (would be great if that is pasted leaving one row above, that is if the first result is pasted in sheet 2 till 10th Row, then the send result should be pasted in 12th row and so on..

the similar kind of question with some changes, I posted in the below link with
http://www.excelforum.com/excel-prog...in-sheet2.html

View 9 Replies View Related

How To Calculate Sales Based On Partial Cell Content (multiple Inputs)

Jan 15, 2010

I have made a dynamic calculator which will calculate the total sale based on 3 criteria in 3 different cells as follows:-

I would like to derive the sales qty in cell C5 if all the 3 conditions in the range B2:B4 is true.

In this case the sales qty for Style-Colour-MRP combination(9103-PINK-399) should be 6.

I am unable to figure out with the formula for the same....

View 9 Replies View Related

Calculations Based On Checkboxes

Mar 2, 2014

I would like to implement a pricing tool where by if you select certain boxes the price will be increased or decreased.

For example. If chk_UtilA is selected on the attached then the target price will be multiplied by 10%.

View 6 Replies View Related

Use Two Different Calculations Based On ID Number In Column

Jun 28, 2012

I have a list in Excel with several hundred 8 digit ID numbers in column D. Column C contains the total number of hours the student employee worked. Column E needs to calculate using two different equations depending on if the ID number in column D is a manager's. If the ID number is an employee the total hours worked is divided by 8. IF the ID number represents a manager the total hours worked is divided by 4. I've attempted this by using an array for the manager ID list and also using VLookup without success.

In essence I need to loop through column D, check which type of ID number is present, and then enter the correct formula in column E.

View 9 Replies View Related

Calculations Based Off Formula From Another Cell

Jul 8, 2014

I'm trying to do two things:

1. I'm trying to show the formula of specific cells in the work sheet. So far I've only found out how to show formulas on the entire worksheet. I imagine there has to be some way of me doing this without using macros.

2. Here's the doozy. What I'm trying to do is use the base code for a formula that is stored in one cell (Formula Page: B5:B7) and apply it to other cells (Calc Page: C4:C6). In other words, I want to apply the cell formula from B5:B7 to the cells C4:C6 and use them to calculate the TOTAL COST. I want it so that whenever I manipulate cells B5:B7, they are also appropriately manipulated in C4:C6.

Please see attached for reference. Attachment 33077

View 14 Replies View Related

Percentage Calculations Based On Times

Jun 6, 2008

i've been viewing different formuals, and have to admit there is alot more to excel than I originally thought, and totally stumped as to what and how to go about my problem.

I have a problem, and it mainly stems from my employer not paying me correctly (and pretty much the other 1600 odd employees encounter the same issue too on a semi-regular basis).

To give you a run down, this is our complexed pay system

Mon-Fri, if you work up to 7h36m you get 100%, then 150% until 10h36 and then 200% after 10h36m working time
Sat, if you work, its 150% upto 7h36m and then 200% there after
Sun, double time all shift
But to throw in some complicated things, here are some more items that need to be considered.
If you work from one day into the next (say fri into sat, and sat into sun and sun into mon, then after midnight, it then goes to that days rates)
If you work your day off, say a weekday, your then paid the eqivelant of saturdays rates unless you were called in straight away which then is sundays rates
If you work your day off, say its a saturday or sunday, then its 200% for the whole shift.
And then public holidays, its 250% upto 7h36 and 300% thereafter

So as you can see, its pretty complicated, and my employer (a government employer) can't seem to get the right software to pay us correctly, nor can the poor employee sometimes work out if they've been paid correctly or not.

So, this is what I have so far:
columns: Day, Type (normal day or work day off or work day off immediate), On1, Sign Off1, Sign On2, Sign Off2, Sign On3, Sign Off3, Working Time, Paid hours
(for instance its my normal rostered monday, I start at 12pm, lunch at 5, return at 545 then finish at 915pm, which equates to 8h30m working time and 8h57m paid time) - the 3rd sign on and sign off is if we do extra work beyond our shift.

There are other things aswell like allowances, but thats for another day, and not as urgent as what i'm really looking for.

Now if anyone can understand what i've just written above, your doing pretty good (even some of the most experience employees still don't understan our pay system), and anyone able to produce a formula for what i'm looking for, i'd be exceptionally grateful, and probably the 1600 odd other employees too who seem to get shafted occassionally.

View 9 Replies View Related

Pivot Tables - Calculations Based On The Fields?

Jan 16, 2014

I am just starting to use the wonderful pivot tables.

I have a long list of data which basically consists of the following info:

-Company Code
-Country
-Account description
-Account balances

The pivot table is set up like so:

Row labels - Company Code, then Country

Column Labels - Account description, eg Input Tax, Output tax, clearing account, import tax, acquisition tax, set off account
Values - Account Balance

The table works perfectly.

Now what I want to do is some calculations based on the fields

- a check that Acquisition tax = the negative of the set off account, (i.e net to nil)

- a sum of the balances in the import, input and output tax accounts

- a comparison of that last figure against that in the clearing account to identify a difference

I tried to do it using basic formulae but I can't drag and drop the formula down the rows.

And I couldn't make out what the calculated cell function does. It appears to only include the titles of my data and not the individual fields.

View 1 Replies View Related

Fill Data Based On Date Calculations

Sep 22, 2006

I am having problems with calculations to be performed on date format. As in attached excel sheet, Start Date and End Date can be defined by the user. Once the user enters the dates, year 0 onwards are to be populated with values so that: (Also, not sure if I will need a button to initiate the calculations or a direct function will suffice)

year0 start = Start Date,
year0 end = (Start Date +12 months) or (End Date), if End Date is before (StartDate + 12)

year1 start = year0 end,
year1 end = (year0 end + 12 months) or (End Date), if End Date is before (year0 end +12)

year2 start = year1 end,
year2 end = (year1 end + 12 months) or (End Date), if End Date is before (year1 end +12)

year3 start = year2 end,
year3 end = (year2 end + 12 months) or (End Date), if End Date is before (year2 end +12)

year4 start = year3 end,
year4 end = (year3 end + 12 months) or (End Date), if End Date is before (year3 end +12)

year5 start = year4 end,
year5 end = End Date

If the dates are such that all years 0 to year 5 may not be covered, the years not used should be blank.

View 4 Replies View Related

Display TEXT Only Based On Number Rating And Calculations?

Jun 15, 2014

I am trying to display result of risk assessment matrix in excel. I have three columns PROBABILITY , IMPACT and RISK RATING (probability *impact).

Probability = Very Low(1), Low(2), Medium (3), High (4), Very High (5)
Impact = Low(1), Medium(2), High(3)
Risk Rating = Low (value between 1 -3), Medium (value between 4 - 6), High (value between 7 - 15)

Is there any way that I just use TEXT in the cell (visible to user) and excel does its magic in the background using the numbers that I have for each TEXT? I don't want to display numbers.

View 2 Replies View Related

Time Efficient Methods For Calculations Based On Different Set Of Data?

May 27, 2014

how to calculate averages and standard deviations based on different time periods without having to manually change the cells?

example:
1st average output at z3, 1st std dev output at z4
data to calculate from c3:c50

2nd average output at z5, 2nd std dev output at z6
data to calculate from c51:c98

3rd average output at z7, 3rd std dev output at z8
data to calculate from c99:c148

and it goes on based on this sequence. i would like to know how to do this without having to change the cells each time i want to calculate. basically what is the quickest way to calculate following this sequence?

View 6 Replies View Related

User Defined Function Based Upon Page Of Calculations

Nov 1, 2008

Indicate that a user-defined function can only be based upon the calculations that can be placed in a single cell. If you have too many calculations to put them into a single cell, e.g., an entire page of calculations based upon a few starting parameters that eventually yield a single value, then how do you reuse this entire page of calculations?

Is there another Excel mechanism that allows an entire page of calculations to used as a stored procedure?

View 3 Replies View Related

Loop Through Of Sheets And Execute Calculations Based On Dynamic Sheet References

Jun 30, 2014

Is it possible to loop through a list of sheets and execute some calculations that have sheet references from a different list of worksheets? For example, you have a list (list 1) of your worksheets, which will be the destinations of the calculations, and you have a second list (list 2) of worksheets that the calculations are based on. So, lets say there are sheet1 and sheet2 in list 1, and sheetA and sheetB in list 2. The calculations based on sheetA would appear in sheet1, and calculations based on sheetB would appear in sheet2. I thought the code would look something like this:

Code:
Sub LoopthroughWorksheets()
Dim sheet_name As Range
Dim sheet_name2 As Range
Set sheet_name2 = Sheets("WS").Range("F:F")

[Code] ......

I'm getting a "Run-time error '1004: Application-defined or object defined error" at this line:

Code:
.Range("K1") = .Range("sheet_name2.Value!A14").Value

View 2 Replies View Related

Select A Variable Based On A Variable

Jun 18, 2009

On my userform I have 20 comment icons (imported pictures), that when clicked need to bring up an InputBox for the user to add a comment, and store that comment in a Public variable specific to that comment which will later be written to the spreadsheet.

To keep it simple, lets say I have two comment icons to click, one to add comments to the "Testing Completed?" field, and one to add to the "Sign-Off?" field.

The first comment icon is named TestCompIcon, the second is SignOffIcon, and the public variables they write to are called TestCompComment and SignOffComment respectively.

To avoid having to code the InputBox procedure for every comment icon on the userform, I was hoping that upon click, the icon would call a centralized routine that would establish the name of the variable that needs to be written based on the name of the icon comment that was clicked. Something like as follows:...............

View 9 Replies View Related

Lookups With Multiple Inputs

Aug 19, 2009

I have a spreadsheet with a medium-sized data set, and I need to look up values from the large table, and thin the table down to only the relevant values.

To arrive at each unique value, I will have to match 3 input cells to the first 3 cells of the data table, then copy values from across that specific line to the appropriate cells of my smaller table. I really don't need to sum or do any math in this step, its just a copy from the master table to the smaller table, the math will come later.

I think I'm attaching the file (remember-first post) so hopefully it will help with what I'm trying to accomplish. Hopefully this isn't a big deal, but I've been pulling my hair out on this all day and I just can't find a solution anywhere that really matches up to this.

View 6 Replies View Related

Composing Date From 3 Inputs

Mar 11, 2014

I'm trying to compose a date based on inputs from a userform. The user selects the day, month and year in combo boxes, and I want to place this data on a single cell in the format DD/MM/YYYY. How can I do this?

View 1 Replies View Related

Multiple Inputs Into Other Worksheets

Dec 26, 2006

I have a spreadsheet with over 70 worksheets. The majority of these are concerned with Work standards (National Occupational Standards), each of these standards are further broken down into performance criteria.

What I would like to happen is for a person to be able to enter a "Yes" or "No" response in a box to a specific question on an assessment report or a witness testimony worksheet. If a Yes is entered I would like the spreadsheet to automatically enter a reference i.e AR1 or WT2 (stated by the inputter on that worksheet) in each of the other seperate worksheets that cover this perfromance criteria with this reference.

Because many of the worksheets contain similar performance criteria, i.e "treating people fairly and with respect". The answer of "Yes" on the assessment report worksheet may require a reference inputting on anything up to 60 different worksheets. Is this possible or am I dreaming of the impossible?

I really should have asked this question before I wrote out all the seperate worksheets.

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved