combine if statements

jasman

Board Regular
Joined
Oct 30, 2010
Messages
141
hi. i have two if statements but i need to combine them so that if BOTH are true then enter "true" into the cell but if BOTH are false enter "false" into cell.

thanks

=IF(F7=L7,"TRUE",IF(I7=L7,"TRUE","FALSE"))

AND


=ISNUMBER(SEARCH("1",F7)) ......plus could you advise how i can ask this formula to also check cell 17 along with f7?) thanks
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
hi thanks for reply if think that would work but my formula needs adjusting.

the first part of the formula i need it to be true even if there is a number in cell f7 but at the moment it says false.

exmaple:

f7= A1
L7= A

I need the formula to return TRUE as it has and "A" in it and also a "1"?

thanks
 
Upvote 0
HI it still returns false as L7 value is A and F7 value is A1.

is there anyway that it only checks the first letter in F7 in this part of the formula:IF(F7=L7,TRUE,IF(I7=L7,TRUE,FALSE)))
 
Upvote 0
Maybe

=(COUNTIF(F7,"*"&L7&"*")*COUNTIF(I7,"*"&L7&"*"))=1
 
Upvote 0
i have two if statements but i need to combine them so that if BOTH are true then enter "true" into the cell but if BOTH are false enter "false" into cell.
This statement of your requirement seems flawed to me since you haven't said what the cell should contain if one of the statements is true and the other is false.
 
Upvote 0
sorry think ive just confised myself!

heres a sample
<TABLE style="WIDTH: 192pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=256 border=0 x:str><COLGROUP><COL style="WIDTH: 48pt" span=4 width=64><TBODY><TR style="HEIGHT: 15.75pt" height=21><TD class=xl25 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 48pt; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15.75pt; BACKGROUND-COLOR: #ccffcc" width=64 height=21>f7</TD><TD class=xl25 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; BORDER-LEFT: windowtext; WIDTH: 48pt; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: #ccffcc" width=64>i7</TD><TD class=xl25 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; BORDER-LEFT: windowtext; WIDTH: 48pt; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: #ccffcc" width=64>l7</TD><TD class=xl25 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; BORDER-LEFT: windowtext; WIDTH: 48pt; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: #ccffcc" width=64>m7</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl26 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 48pt; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" width=64 height=20>A</TD><TD class=xl26 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; WIDTH: 48pt; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent" width=64>B</TD><TD class=xl26 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; WIDTH: 48pt; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent" width=64>A1</TD><TD class=xl26 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; WIDTH: 48pt; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent" width=64 x:bool="TRUE">TRUE</TD></TR></TBODY></TABLE>

basically, if the letter in l7 matches the letter in f7 or i7 AND l7 contains a number then return TRUE else FALSE
 
Upvote 0
ive come up with this and it works how it should:

=AND(MATCH("*"&LEFT(L7,1)&"*",F7,0),ISNUMBER(SEARCH("1",L7)))

however how do i get it to also look at cell i7 in the MATCH part of the formula......and also instead of the number "1" can it be true if there is any number for example 2.....

all help appreciated
 
Upvote 0

Forum statistics

Threads
1,224,560
Messages
6,179,520
Members
452,921
Latest member
BBQKING

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top