Currently have the following excel table
I would like to do the following
I want to write a IF statement or something else which would do this:
if (the value in service 4 for company 1 is 1, and the value in service 1 for company 1 is also 1, then copy the value 1 to a new column)
how can one do this in excel ?
If the matching does not exist then copy 0 or nothing
Assuming you put the company name that you want to check in G1 you could use the following
=--AND(VLOOKUP(G1,$A$2:$E$5,2,0)=1,VLOOKUP(G1,$A$2:$E$5,5,0)=1)
For you results of just needing 1 or 0 the above would work as true will evaluate to 1 and false will evaluate to 0.
However if you wanted some other result other than 1 and 2 I would change the formula to:
=IF(AND(VLOOKUP(G1,$A$2:$E$5,2,0)=1,VLOOKUP(G1,$A$2:$E$5,5,0)=1),"True Result","False Result")
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.