IF AND with WILDCARD

ah2024_2024

New Member
Joined
Jun 18, 2024
Messages
23
Office Version
  1. 365
Platform
  1. Windows
I've adding a VBA to sheet with a ton of date and I'm good most ever where but cannot for the life of me figure out how to make this work.

=IF(AND($AP6,">=2/1/2025",$D6<=$AV6,$AQ6=2,I6="A",$O6,"<>*FLAT RATE"),"YES","NO")

I have now figured out that it's that an IF AND cannot support a wildcard (the FLAT RATE section of the formula).

ANY HELP WOULD BE APPRECIATED.
 
How about
Excel Formula:
=IF(AND($AP6,">=2/1/2025",$D6<=$AV6,$AQ6=2,I6="A",right($O6,9)="FLAT RATE"),"YES","NO")
 
Upvote 0
This doesn't look right. Can you explain what you're trying to do here?
Rich (BB code):
=IF(AND($AP6,">=2/1/2025"...

@Fluff the OP wants to check if it does not contain "FLAT RATE".
 
Upvote 0
Missed that bit, I suspect it should be
Excel Formula:
$AP6>="2/1/2025"
 
Upvote 0
How about
Excel Formula:
=IF(AND($AP6,">=2/1/2025",$D6<=$AV6,$AQ6=2,I6="A",right($O6,9)="FLAT RATE"),"YES","NO")
So, this work but didn't work. It work to yield no if O2 has the words flat rate in them, but it also yielded no for all the other cells.
 
Upvote 0
In that case can you post some sample data.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
1738265824409.png

I can't download things on my work computer. But, AW for the 2 orange ones in column D should show as NO since O has the words flat rate in them. If I removed this section $O6,"<>*flat rate" from the formula it works great. But, I need AW to yield a NO if O has the words FLAT RATE in where in the cell.
 
Upvote 0
In that case can you post some sample data.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
I can't download anything on my work computer. I just just try that. But, I did add a picture and more details below.
 
Upvote 0
Try:
Excel Formula:
=IF(AND($AP6>=DATE(2025,2,1),$D6<=$AV6,$AQ6=2,I6="A",RIGHT($O6,9)<>"FLAT RATE"),"YES","NO")
 
Upvote 0
Solution

Forum statistics

Threads
1,226,831
Messages
6,193,206
Members
453,779
Latest member
C_Rules

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