If statement help needed

PWil84

New Member
Joined
May 20, 2021
Messages
41
Office Version
  1. 2019
Hello all,

I'm trying to assign all of the expenses that have "Public" in the expense description as operations management in nother field and all other expense that don't have "Public" as "Some other Department". When I run the if statement below as part of my Select query it returns all of the records with "Some other Department" in the newly created field column. For more details please see below:

1669695676423.png


1669695714059.png
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
The IF function does not support wildcards
Try something similar (with your structured references to
Excel Formula:
=IF(ISERROR((ISNUMBER(SEARCH("Public",A1))),"Some Other Dept","Operations Management")
 
Upvote 0
That is an excel formula, surely?, question is Access in the Access forum?
 
Upvote 0
That is correct. OTOH as OP used IF in his title, I thought he had posted in the wrong forum. My mistake
Besides posting it in the Access Forums, the details of the original post also kind of give it away (clearly an Access IIF formula, and screen print of an Access Query).
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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