Compare to TEXT fields

macdonald007

New Member
Joined
Jun 13, 2002
Messages
11
Hi I have a record that looks like this:

555-55555 TEXT TEXGH

I want a simple funtion that will look at TEXT and tell me that it is not equal to TEXGH

The field type is text. Can I do this with a query using the IIF function?
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Just use <>"TEXGH" as the criteria for the field.
 
Upvote 0
I agree that that should work, but instead of specifying the specific code, I want to do something like this that will pick up if the field does not match.

This WORKS fine if the field type is numeric, but isn't working if it is TEXT.

This is driving me nuts.

IRSDESC1: IIf([AC_TB.IRS_DESC1]<>[AC_TB_1.IRS_DESC1],-1,1)
 
Upvote 0
Can you explain yourself further?

The Iif statement you quoted would compare a field in a record with itself, surely.

What are you actually trying to do?
 
Upvote 0
The table in question has the structure:
55555555.1
55555555.2
55555555.3
55555556.1
55555556.2

Each record has data that must be the same on the account level even though we carry the portfolio level detail in the table. However, I also have on each record the base account number (55555555 etc.)....

So, by opening the table twice in a query, setting the account numbers one for one and then comparing the items that must be the same using IIF I can identify the mismatches...this works fine for numeric and yes/no fields, but does not work for text fields...
 
Upvote 0

Forum statistics

Threads
1,221,792
Messages
6,161,995
Members
451,735
Latest member
Deasejm

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