controlling a formula with the value from another cell - excel

This is a very basic example.
What is in A3 and A4 are the formulas that are in B3 & B4 respectively.
I want the value in B4 to be "ValueB2"(the value from B2)
I basically want to control the formula in B4 with a value from another cell(C4)
Can this be done or how do I do it?

=INDIRECT(CONCATENATE("b",C4))
this in B4 works

The INDIRECT function seems to be what you would want to use for this based on your description.
http://office.microsoft.com/en-us/excel-help/indirect-function-HP010062413.aspx

Related

In MS Excel a cell contains 15-10 how to separate the numbers ? Edit

In MS Excel a cell A3 contains 15-10 and A4 Contains 9-9, A5 Contains 15-2. In B3 I Want 15+(10/12), in B4 I want 9+(9/12) Similarly in B5 I want 15+(2/12). How can i do this by a formula?
Interesting format.
Nonetheless, you can use this formula, obviously replacing A1 with your particular cell:
= LEFT(A1,FIND("-",A1)-1)+RIGHT(A1,LEN(A1)-FIND("-",A1))/12
In B3 enter:
=--MID(A3,1,FIND("-",A3)-1) + MID(A3,FIND("-",A3)+1,9999)/12
and copy down
Similar to foot-inch conversion format.

Excel If 2 cells match third returns specific text

This seems like a simple request but I am struggling to find a simple answer.
I have 3 cells, let’s call them A1, B1, C1. I would like a formula to address the following:
If the numerical values in A1 and B1 match then C1 needs to show the text “complete”
If the numbers in A1 and B1 do not match then C1 to show text “Partial”
If there is nothing in A1 and B1 then C1 to show text “Incomplete”.
I hope this is a simple enough explanation. Help appreciated.
If you use A1 B1 C1 cell,
C1 function is
=IF(AND(A1="",B1=""),"Incomplete",IF(A1=B1,"complete","Partial"))
=IF(A1&B1="","incomplete",IF(A1=B1,"complete","partial"))
in the other cell will do it
May be you can try this in cell C1,
=IF(A1<>B1,"Partial",IF(A1="","InComplete","Complete"))

If 1 or 2 cells are blank then

I'm trying to write a simple formula to check whether either 1 or both cells are blank and, if so, leave the resulting cell blank. I want the resulting cell to only display a calculation if both cells are filled in.
I've got this do far though it doesn't work as I wanted: =IF(OR(C4<>"",B4<>""),A4-C4,"")
b4 has a date and c4 has a numeric value (4). the formulate is in d4. I want to check if b4 or c4 are blank and, if so, leave d4 blank too, else take c4 from a4 (14 as of now).
It should work:
=IF(ISBLANK(C4);"";IF(ISBLANK(D4);"";A4-C4))
It checks if C4 is a blank cell, if not then checks if D4 is blank, if not then does the math.
I recommend using ISBLANK to check for blank cells.
Formula for your D4:
=IF(OR(ISBLANK(B4), ISBLANK(C4)),,A4-C4)
Just try this formula
=IF(AND(C4<>"",B4<>""),A4-C4,"")
Also, I used =IF(A2&B2="",TRUE VALUE, FALSE VALUE) which worked great

In a spreadsheet, I want to copy cells with a negative value onto another cell where there is a floor for negative values

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

Excel: Separate text in cell

I am trying to seperate a field into two by finding the values that are in the left of an asterisk and then what's on the right.
For example
Cell C1 is 0A*33 then C2 should be 0A and C3 should be 33.
I have the following formulas in cells C2 and C3:
=LEFT(C1,SEARCH("~*",C1,1)-1)
=RIGHT(C1,LEN(A3)-SEARCH("~*",C1,1))
These formulas work great as long as there is a asterisk in the cell, if not it results in a #VALUE! error.
I have even tried (For the left side) =LEFT(C1,IF(ISERROR(SEARCH("~*",C1,1)-1),C1,SEARCH("~*",C1,1)-1)) with the same outcome.
If the cell does not have an asterisk it must return the whole value in C2 and nothing in cell C3.
Have you tried:
In C2:
=IF(ISERROR(FIND("*",C1)),C1,LEFT(C1,FIND("*",C1)-1))
In C3:
=IF(ISERROR(FIND("*",C1)),"",RIGHT(C1,LEN(C1)-FIND("*",C1)))
You could use the same idea with SEARCH, but FIND works fine in this case:
In C2:
=IF(ISERROR(SEARCH("~*",C1,1)),C1,LEFT(C1,SEARCH("~*",C1,1)-1))
In C3:
=IF(ISERROR(SEARCH("~*",C1,1)),"",RIGHT(C1,LEN(C1)-SEARCH("~*",C1,1)))
=LEFT(C1,FIND("*",C1&"*")-1)
=MID(C1,FIND("*",C1&"*")+1,255)

Resources