Multiple formula in Excel - excel

I have a table with multiple cells. I am trying to get a formula working according to the following:
If Cell A is empty then Cell D has to be empty
But if A is a number then I need to check what is in Cell B to calculate Cell D
(if Cell B = "TOP",Then Cell D= cell C*170) Or If Cell B="BAR",OR ="CAR", OR ="DAR", Then Cell D = Cell C*170)

In cell "D1"
=IF(A1="","",IF(B1="TOP",C1*170,IF(OR(B1="BAR",B1="CAR",B1="DAR"),C1*170,"NOT FOUND")))
Check if A is a number:
=IF(A1="","",IF(ISNUMBER(A1),IF(B1="TOP",C1*170,IF(OR(B1="BAR",B1="CAR",B1="DAR"),C1*170,"NOT FOUND")),"Not Number"))

You can do a nested IF statement to go in cell D1. It looks like your doing the same calculation whether B1="TOP" or your other list of variables for B1 so you can just put them all in the same OR statement. Something like:
=IF(A1="","",IF(ISNUMBER(A1),IF(OR(B1="TOP",B1="BAR",B1="CAR",B1="DAR"),C1*170,"A1 is number, B1 not in list"),"A1 not a number"))

Related

Reference an Excel Column based on an Excel cell value

In Excel how can I create a cell function which does the following ...
If cell C1 contains the value 6, I want cell B1 to be the contents of cell M1,
If cell C1 contains the value 7, I want cell B1 to be the contents of cell N1
and so forth, increasing by one column (M,N,O...) at a time.
I've tried with the functions INDEX, IF , MATCH and, LOOKUP .
Use INDEX and simple math:
=INDEX(1:1,C1+7)

how to backcheck aganist cells and data validation list?

I've set cell A1 with data validation with list of possibilities: a,b,c,d
next I would need formula which will do this:
if a is chosen in A1 cell, set cell C1=b, C2=c, C3=d
if b is chosen in A1 cell, set cell C1=a, C2=c, C3=d
if c is chosen in A1 cell, set cell C1=a, C2=b, C3=d
if d is chosen in A1 cell, set cell C1=a, C2=b, C3=c
is there some handy formula for this purpose which I will place in cells C1, C2 and C3 which will backcheck with A1 and also between themselfs to avoid duplications?
google-spreadsheet
C1:
=FILTER({"a";"b";"c";"d"},{"a";"b";"c";"d"}<>A1)
The following array formula will do the job in Excel (select the range C1:C3 and use Ctrl+Shift+Enter to enter the formula):
=MID(REPLACE("abcd",MATCH(A1,{"a","b","c","d"},0),1,""),ROW(),1)
You haven't specified what you want the result to be if A1 contains neither of those values, but you may wish to wrap it in IFERROR().

Insert a value to a cell in excel using formula in another cell

I need to insert a value to a cell in excel using formula in another cell.
Say
A1 = "Test"
B1 = formula to insert A1 to C1
C1 = A1
Can I write a formula in B1 to insert value in C1?
I don't need any formulas in C1.
If Yes, What should be the formula?
If there it is next to the cell AND has no value in B2, it is possible, otherwise it is not.
Use Split()
Split(CONCATENATE("Text for B1#Sperator$$",A1),"#Sperator$$",FALSE)
It really depends.
EDIT
Out dated. Only works in google sheets.
Without using VBA or formulas in column C you can't achieve this.
A simple solution using formulas:
In cell C1, paste the following formula and drag it down:
=IF(B1=1;A1;"")
So if the content of cell B1 is equal to 1, your cell at column C will display the respective value of the same row at column A.

Apply formula on condition

I'd like to add a condition to one of my Excel formulas. In Cell C1 I have a formula like this : = A1 +B1 but if cell A1 is empty but cell B1 does contain a value (or vice versa) I'd like cell C1 to stay empty.
Condition : Only apply formula if both cells contain any value.
(The formula I'm using in cell C1 calculates the difference between dates, and does this for a list of values, so it is applied on the whole range "C:C".)
Here you go
=IF(OR(A1="",B1=""),"",A1+B1)
=IF(SUM(IF(A1="",0,1),IF(B1="",0,1))<2,"",A1+B1)

looking for excel formula combining columns and rows

Imagine a spreadsheet with 4 columns: A B C D
If the B column is equal to D column, I want in column A the result of column C
for example: if B2 is equal to D2, A2 value should be C2 value
if not equal it should show empty or false or something
I have uploaded a sample spreadsheet
What is the formula to use?
In cell A2, simply put:
=IF(B2=D2,C2,FALSE)
And fill down for the other rows.
The logic should be simple enough to understand. And you can type in something else instead of FALSE if you want.
EDIT:
As per amendment of problem:
First move the column D before column C (meaning Email will be in Column C and Log will be in column D)
In cell A2, put the formula =VLOOKUP(B2,C:D,2,0)
Fill the formula down.
This would go in A2.
=IF(B2=C2,C2,"")

Resources