issues with formula

rhombus4

Well-known Member
Joined
May 26, 2010
Messages
586
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Been extending a formula

Initially I had
VBA Code:
=IF(OR(AND(A1 = "Cat", B1 <> ""),AND(A1 = "Dog", B1 <> "")),B1-C1,"")

Tried to extend to below for certain results in the formula but not sure how to get the first part to workas if its not cat or dog It results in False
VBA Code:
=IF(OR(AND(A1="Cat",B1<>""),AND(A1="Dog",B1<>"")),IF(B1-C1>10,"Over 30 days",IF(B1-C1<-10,"10 Days Passed",B1-C1)))
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
W
Been extending a formula

Initially I had
VBA Code:
=IF(OR(AND(A1 = "Cat", B1 <> ""),AND(A1 = "Dog", B1 <> "")),B1-C1,"")

Tried to extend to below for certain results in the formula but not sure how to get the first part to workas if its not cat or dog It results in False
VBA Code:
=IF(OR(AND(A1="Cat",B1<>""),AND(A1="Dog",B1<>"")),IF(B1-C1>10,"Over 30 days",IF(B1-C1<-10,"10 Days Passed",B1-C1)))
What you want as result if its not cat or dog?
 
Upvote 0
Maybe
Excel Formula:
=IF(B1="","",IF(OR(A1={"Cat","Dog"}),IF(B1-C1>10,"Over 30 days",IF(B1-C1<-10,"10 Days Passed",B1-C1)),""))
 
Upvote 0
Solution
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,045
Messages
6,122,836
Members
449,096
Latest member
Erald

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