I'd like to ask how can I use if and else to my calculation in Excel. Here's the case:
A1=usd, B1=php, C1=conversion amount in usd, D1=total amount in usd
Question: The formula will place in cell d1. I want this way, if I put amount into cell a1 it will only lookup the amount and displayed in cell d1 or if I'm going to put amount in cell b1 and c1, cell d1 calculates the conversion of cell b1 and c1 (a1/c1)? Can you provide me formula or code?
Try
=IFERROR(IF(A2<>"",A2,B2/C2),"")
You can modify the conversion as per your wish.
Note: It will calculate conversion only if the A2 cell is blank or else it will display the value of A2.
Let me know if it works.
Related
I wanna ask you. I have value which I want divide and sum. I will give you example:
Which I want series sum
A1 Value 5 B1
A3 Count 4 B3
10,41666667 **B5**
=SUM(B1;B1/2;B1/3;B1/4)
I want when I change count value formula will calculate automaticaly as formula "=SUM(B1;B1/2;B1/3;B1/4)"
Count value continues up to n, formula should work even if count value 1000.
Please help. I hope so I could explain.
Try this formula
Formula used in cell B5
=SUM(B1/ROW(INDIRECT("1:"&$B$3)))
Or you can use SUMPRODUCT Function as well, to avoid the CTRL+SHIFT+ENTER
Formula used in cell D5
=SUMPRODUCT(D1/ROW(INDIRECT("1:"&$D$3)))
Is there a way to create a formula in one cell that will change the value in another cell based on some criteria, without scripting? Example: cell a1 contains a numerical value. cell b1 contains a value from a drop-down list, say, "YES,NO". If cell b1 is set to "YES" I want to remove (set to zero) the value in cell a1. What I'd like to do is have a formula in cell c1 that interrogates b1 and sets the value in a1 accordingly. Is the only way achieve this writing code and using setValue?
you cant remove it without a script. you can visually hide it in various ways. if the A1 is subject of further sum (as in your case per your comment) the sum formula can be always altered to reflect desired output. example:
if your formula is
=SUM(A1, C5, D22)
you can do
=SUM(IF(B1="YES", 0, A1), C5, D22)
Use the following on the cell you need the calculation (or zero) on:
=IF (B1="YES",0,SUM(A:A))
Using the given formula, you would do the SUM calculation for the whole Column A if the value on B1 is "YES", if not, then a 0 would be placed on the cell you put the formula on.
First, my apologies for the confusion of this question. The title probably isn't worded very well, but I couldn't think of a better way to ask it. And because I don't know how to ask it simply, I could not find any answers.
I am wondering if there is a way to subtract a value of a cell from another cell if yet another cell is not blank. This is simply done when not using a range using something like:
=if(a1<>"", c1-b1, c1)
But I want to check multiple cells in a range. If a cell in that range is not blank, subtract a correlated value from a working total, otherwise subtract nothing. Go to next cell in the range, if that cell is not blank, subtract a correlated value, and so on...
Let's say:
Original value to be subtracted from is c1
Range of cells to be checked are a1:a10
Coorelated value to subtract is located in b1:b10
So... in a1:a10, there will be date. If a1 is not blank, subtract b1 from c1. Lets call this value workingValue. Go to a2... if a2 is not blank, subtract b2 from workingValue. Go to a3... if a3 is not blank, subtract b3 from workingvalue, and on down the list.
The final workingValue can go anywhere, but for simplicity, let's put it in C2.
Is this possible with an excel formula (not VB)?
Use this in C2:
=(C1*ROWS(A1:A10))-SUMIF(A1:A10,"<>",B1:B10)
I am trying to figure out a way to get Excel to increase a cell, A1, that controls another cell, B1, until B1 equals a constant cell, C1.
For instance, the industry standard to do a task is 4000 hours and is a constant; cell C1 = 4000.
Cell A1 is the number of work weeks my team must work to finish this task. Cell A1 drives a lot of calculations but arrives at cell B1, which is the work Hours necessary to complete the task. I must change the work weeks (A1) to change the work hours (B1) to match the standard. Changing A1 changes B1 (on a wicked curve, which negates using a straight up formula). I need B1 to equal C1 by letting Excel change A1. A1 will then automatically tell me how many weeks the team should work. I cannot find a formula and I don't know how to increment A1.
The examples below show me hand-jamming A1 which moves B1 closer to matching C1. C1 then gives me the proper number of weeks based on my
A1=10.00 B1=1900 C1=4000
A1=15.00 B1=2850 C1=4000
A1=20.00 B1=3800 C1=4000
A1=21.06 B1=4000 C1=4000
Ideas?
Suppose the formula in B1 is =A1*190. DATA > Data Tools, What-If-Analysis, Goal Seek..., Set cell: B1, To value; 4000, By changing cell: A1.
The formula in B1 may be very much more complex and refer to various other cells and ranges.
In spreadsheet cell B1, the value is -1200.
I want cell B2 to copy the value of B1 and limit (validate?) it to no less than -800.
I'm using google docs but can also use excel if those functions are not available in google docs.
Edit:
If B1 has the value of 2000, B2 should have the value of 2000.
If B1 has the value of -2000, B2 should have the value of -800
Excel & Google Spreadsheets
=Max(B1,-800)
Excel formula would be pretty easy, probably similar in Google Spreadsheets:
In B2, put this formula:
=If(B1<-800,-800,B1)
This is saying:
If the value in B1 is less than -800, then put the value "-800". Otherwise, use the value from B1. This effectively puts a "floor" or a lower bound on the formula.
You don't need any maths here. I'm using Excel but I think it is pretty similar in Google.
Suppose that B3 holds floor, no constants in formulae :-)
B2 => =if( b1 > $b$3; b1; $b$3)
b3 position is fixed so you can copy the expression