VBA Math Formula
Mar 13, 2009Having a real hard time with this,able to do it in normal excel, this project I'm using vba. Here is a example of what I can not do, if you can give a a formula for this I will be real Happy.
View 5 RepliesHaving a real hard time with this,able to do it in normal excel, this project I'm using vba. Here is a example of what I can not do, if you can give a a formula for this I will be real Happy.
View 5 Repliesi am trying to make an excel sheet that does calculations to help drydock a submarine....
docking math is used and it works as follows:
6-11-7
6-11-7+
6-11-7++
6 is feet
11 is inches
7 is 1/8ths
+'s are 1/16ths
so i want to be able to have a list of set measurements like above and then have one set measurement be subtracted from the list. like
12-4-6+
13-5-4
14-2-4
and have 6-2-5+ be subtracted from all of the above and be displayed on a second page. I have slammed my head against the wall for about 3 days now and i am a excel newbie. so if i messed up somewhere or anyone could help i would greatly be appreciate it.
Using vba textboxes too do math .I have attached a sheet too explain, not sure if its possible. If it is I know this is the place too find out.
View 4 Replies View RelatedI am trying to create a macro that will do some basic math using J, I as referencing.
Sub Table()
Dim Temp
J = 2
I = 1
For Temp = 1 To Question
Cells(J + 35, I).Formula = (Cells(J, I + 2) + Cells(J, I + 2) * Cells(J, I + 3) - Cells(J, I + 4))
J = J + 1
Next
End Sub
how do I get the math to work without the R1C1 referencing?
Trying to compute annual change I've always used the formula "(b1-a1)/a1" - where b1 is the current year, a1 is the prior year. I've been asked to compute average annual change over a number of years and thought simply by using the above for each year and then taking the average of all these, I'd be ok. I recently found a formula as follows: "(y2/y1)^(1/n)-1", where y2 is current year, y1 is 1st year I have data, n = the number of changes.
View 7 Replies View Relatedi have a formula that i am trying to place in excel, however i am not sure what the function is I need to call or if there is one. the formula is G(sec Z)
View 2 Replies View RelatedHow do I correct to make conditonal formula with number values ?
My main worksheet has at leat 24 columns and as many as 30 rows, all have
numbered values. Rows are defined names.
I want to get average values when at least 2 conditions have certain values.
I tried =SUM(IF(AND(MapKpa:MapKpa=40),(RPM:RPM=1000),grmcyc:grmcyc))
and answer given is really total of all 30,000 row values for grmcyc and not
when mapkpa values = 40 and RPM = 1000.
Also best would be if the conditions allow lets say when Mapkpa is between
40 and 45 and RPMs between 1000 and 1500 to have a window of grmcyc average
I used Sum but really want an average of grmcyc when Mapkpa and RPM meet the
conditions so I can build a results table of what the grmcyc average value
was from 20 to 105 KPA in 5 KPA windows along with smaller RPM ranges.
I have a spreadsheet acting as a check register. In looking through the over 2300 entries, I am getting "odd" rounding issues. I have attached a small piece of the worksheet to demonstrate this quirkiness. As you can see, I am adding numbers out to two decimal places (which should result in two decimal place answers). The result for 11/11/2002 has become a more complex number. And, the result for 11/14/2002 goes back to two decimal places.
I have upgraded my office suite since 2002. Could that be an issue? I prefer not to have to "force" the rounding =round(result,2) to solve the problem.
I have a user that wants me to calculate a value for x. The user will input the variables a and b into this equation: b/a = .0231x * EXP(.0439*x). The user insists that the solution to this problem must be arrived iteratively, honing in on the correct answer. Is that right? It looks to me that surely there is a way to solve this mathematically.
View 7 Replies View RelatedCan anyone list the formulas needed in Excel
+
_
x
divide
Let's say in cell A1 I have something like "10-25" or "4+4". I want to keep A1 just like that, but I would like to solve the arithmetic in A1, in cell B1. So B1 would need a formula that gives the answer "-15" or "8". How can I do this with large data sets?
View 7 Replies View RelatedI am looking for the easiest way for my worksheet to perform the following:
My 1st sheet (Sheet1) has columns A-C
In Column "A" there is a Cust # call it "P200"
In column "B" I have an invoice amount of $500.00
In column "C" -In this case, I need this field to calculate 15% of the amount in column "B"....and return the result of $75.00 (however, this 15% figure will vary based on data looked up in (Sheet2)
ie... in (Sheet2)
Column "A" will list all cust #'s that my company has - A1=P100, A2=P105, A3=P125, A4=P127, A5=P200 etc....
Column "B" has each respective discount amount for that customer by %... B1=10%, B2=10%, B3=12%, B4=20%, B5=15%
So the macro I need for (Sheet1- column C) will need to search "Sheet2" column "A" to find the "P200" out of the long list and then take the corresponding % amount in column "B" (in this case it's 15%) and use this figure in (Sheet 1) to perform the calc.
I need to sum column L then divide that by 36 then multiply that by the sum of column N. How can this be accomplished with a formula?
View 9 Replies View RelatedGiven a list of numbers and a list of 'allowable' operators, come up with a specific total. ("The numbers game" on countdown on BBC2.... ooooh Carol Voderman)
For example, given the numbers 1, 3, 4 and 5 with valid operators +, -, /, * come up with a solution equal to 15. All numbers must be used once only. Use operators as often as required. The specific example above was given to me and I personally think its not solvable (might be a practical joke). But I am wondering is it possible to prove this through assertions or develop an algorithm to solve such puzzles. I can get 14 and 16, but not 15....
attempting to utilize the powers of Excel to generate a math worksheet for my children. I have no experience with macros and I have only used the basic functions and formulae.
Basically I need assistance in designing a worksheet where I can input the number of problems I want displayed, the type of problems (add or minus), and the number ranges for the values. With a subtraction problem, I want the formula to make certain the top number is not lower than the bottom number. Also, I would prefer that the worksheet maker does not generate duplicate problems. Once generated, I have the option to print the results for the kids to take with them or sit on the computer and enter the values - whereby Excel will instantly turn color the answer cell green for a correct answer, and red for an incorrect answer.
Assume A1=25 and A2 = 35.
I typed, in cell A3: =A1+A2 which returns: 60.
Is there a way to present, in a single cell, instead of the formula references - something like: =25+35 as TEXT ?
(Any change in A1 and/or A2 will be reflected in the presentation of those two values
I checked some add-ins functions, like "MoreFunc" etc, and INDIRECT - but no results.
I am trying to put together a basic sheet with what I think is basic math, however, the multiplication does not seem to be working properly.
Field 1 is land value, field 2 is total acres. The math I have in field 3 is to give me a value per acre. Here is that formula: =Sum(B3/C3)
I have set the field to a number field with two decimal places.
Field 4 is Total Dry Acres field 4 is calculated to give total value for dry acres (here is where I am having problems) Here is the formula: =Sum(D3*E3)
Here are the numbers: Field 1 = 218702 Field 2: 1536.51 Field 3 (calculated): 142.34 Field 4: 1171.75 Field 5: 166791.54
It all looks good on the spreadsheet, however the field 5 number is not correct.
Break it out on a calculator: 218702 / 1536.51 = 142.34 (rounded)
Now 142.34 * 1171.81 = 166795.44
so working on the calculator, there is a difference of 3.69 between the two.
I am looking for some examples of simple math (Adding, Subtracting, Dividing & Multiplying) using Text box values in a userform.
I have 6 textboxes. 3 of them for data entry and 3 of them for calculating from the other three.
I am not looking to work of any worksheet, it must be done in the user form.
I am having an issue with Excel not adding three numbers correctly.
C10 = .82
C11 = .18
C12 = .70
C14 = Sum(C10:C12)
I also tried C10 + C11 + C12
Excel keeps telling me the answer is 1.69!
I need code to attach to a button!
In cell A1 I enter number of teams.
In Cell A2 I enter number of games to play.
Is there a way for me to click a button and...
In columns A and B it will give me a list of teams to play each other
based on the criteria above.
In Column A will be home team and B is Visitor.
Example I enter 9 teams with 12 games to play, hit the button and it will list the games in columns A and B.
I have Three different combinations which are in cell A & B, These combinations are with similar signs as in A1=2- & B1 = 2- (& A1 = 2+, B1=2+). Then I have numbers with no signs which A1 =2 B1= 2. My approach is to limit to these and these combinations only and use a formula which is uniformally applied on these combination. I want A1 and B1 to take only like signs like -- or ++ or without any sign. The rest shd be ignored. IS there a way of sorting two columns which have different combinations liek -- or ++ or -+ into a area where u can apply a particular formula? Hence first i take a number and move signs on the left and then apply this
IF A7 = 2- . B7 = 3- THEN
IF(OR(RIGHT(TRIM(B7),1)="-",RIGHT(TRIM(B7),1)=" ",RIGHT(TRIM(B7),1)="+"),LEFT(TRIM(B7),LEN(TRIM(B7))-1)*3,B7*3)
We make many graphs using XYscatter charts with lots of data points using Excel 2003 with the horizontal scale properly scaled as frequency. I have been asked to label that axis in some way as period (=1/frequency) without changing the scaling for the data plot. Is there a suitable way to do this? It would be OK to just change the axis numbers to 1/frequency computed from them automatically. Is Excel 2010 any easier for this?
View 9 Replies View RelatedI was wondering if there is a formla that will delete a formula when it has done its calculation, or stop the formula from constantly updating.
I've got a formula
=IF(COUNTA(A1)=1,TODAY(),"")
When something is typed in Cell A1 the cell with the formula will input todays date.
Is there a formula that will stop this formula from updating, as when you go into the file on a different day the date would have been updated.
I have a situation where I have to curve fit data, this can lead to different formulas being used with varying constants.
Is it possible to pickup a TEXT based formula and related constants from other cells, and then place this into another cell as a functioning formula. For Example
Cell A1 contains the formula as a text string whether it be y=a+bx+cx^2, or y=a+b/x, etc
Cells A2:A6 contain the individual constants, a, b, c, etc
I would then want the VBA to read the text based formula and put it into an output cell as a functioning excel formulae.g
In cell B10: =a+b*A10+c*A10^2
I understand picking the constants up and putting the formula should not be too much of an issue, however trying to insert the variable form of the curve fit is the part that I am struggling with, and am unsure if possible.
Here is the scenario:
A B C D
BananasApplesOrangesTotal113=A1+B1+C1
I need to reference the formula in D1 with the cells headers names.
In a perfect world, it would take
=A1+B1+C1:
and produce:
=Bananas+Apples+Oranges
I have an existing formula in a cell linking back to a start date only. determining how to add an additional formula to exclude weekends, and possibly holidays.
View 2 Replies View RelatedI am trying to use a combination of Concatenate and IF formula to produce an email.
My input.
D4: First Name:
D5: Middle Name:
D6: Last Name:
D8: Organization:
Once all these are filled, I want the formula to produce a result like
FirstName.M.LastName@Organization.com
I have used the following formula.
[Code] .....
Problem is if there is a middle name the formula works fine, but in case where there is no middle name, it produces the following result.
FirstName..LastName@Organization.com
How do I remove the additional (.) in cases where there is no middle name.
Attached File : Email Generator.xlsx
I'm having some trouble trying to get excel to input a formula into a cell. I'm still a novice at VBA right now, so I don't think my problem will be too much of a brain buster.
I want a formula in Cell A6 (and I already know it correctly works) in this format: =E6&VLOOKUP(I6,'FA-Fund Data'!B$1:C$2000,2,FALSE)&J6
Is it possible to write a formula that skips x number of cells and have the formula autoincrement as usual. For an examples lets say I want to skip 3 cells and I have entered in the cells listed:
A1= "1"
A2= "2"
A3= "3"
Then I type in the simple formula in the cell
B1= "=A1"
and then drag down but it skips 3 cells so then
B5= "=A2"
B9= "=A3"
If it didn't skip then
B1= "=A1"
B2= "=A2"
B3= "=A3"
this is just an example as I will be writing more complex formulas and need some thing that I can write into the formula so that it skips.
Something similar to this B1 "=A1(skip3cells)"
I would like to copy a formula in a cell and then paste only the text of the formula, but I can't figure it out. Basically, I would like to avoid going into the cells and absolute referencing or hitting F2, then copying the text.
When I hit "Ctrl C" to copy the cell, then hit "Alt/E/S/F/Enter" to paste the formula, it is just like a regular copy/paste formula-wise in that the references move.