Just need a tweak on countif formula....due to space

SuzyQPA2

Board Regular
Joined
Oct 28, 2004
Messages
90
Excel Workbook
ABCD
1Plan Per IBXPlan per systemMatch Plan*
2DIRECTPOSKEYSTONE DIRECT POS FTFALSEnot working
3HMO HIGHKEYSTONE HMO HIGH FTTRUEworking
Sheet2
 
Hello, Try any of these,

=OR(AND(LEFT(RIGHT(A1,2))="F",LEFT(B1)="F"),AND(LEFT(RIGHT(A1,2))="P",LEFT(B1)="P"))

=OR(AND(RIGHT(A1,2)="FT",ISNUMBER(SEARCH("full*time",B1))),AND(RIGHT(A1,2)="PT",ISNUMBER(SEARCH("part*time",B1))))
 
Upvote 0

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Good idea with the wildcard and search, could be shortened to:

=ISNUMBER(SEARCH(IF(RIGHT(A1,2)="FT","full*time","part*time"),B1))
 
Upvote 0
The information is coming from different systems.
I have the Plan information they are enrolled in which represents COL A
and I have the EE Payroll Status coming from Payroll which represents COL B
so if the payroll person entered things correctly they will always be a match but they will be worded as you can see differently.
I actually resolved this the long way by inserting another column and this formula to get
an FT or PT since I couldn't get a formula to work. A long way around the problem.
I will look at your formula and see if I can replace my long way w/a shorter way.

=IF(OR(b2="fulltimeregular",b2="fulltimetemporary",b2="fulltime-regular",b2="fulltime-temporary"),"FT","PT")

Then i compare same to same with another formula
=COUNTIF(A2,"*"&C2&"*")>0
This is looking for the FT or PT in COL A and if it's a match gives me a true/false
 
Upvote 0
Thanks Haseeb & Hotpepper - I will try out this shorter version will save me spreadsheet space and work.
 
Upvote 0
Excel Workbook
ABCD
1planEE status var
2KEYSTONE POS FTFulltime-RegularTRUE
3HMO HIGH FT- KEYSTONEFulltime-RegularFALSEcan your formula allow for this being in the middle?
4KEYSTONE HMO LOW FTFulltime-RegularTRUE
5KEYSTONE HMO LOW FTFulltime-RegularTRUE
6KEYSTONE HMO LOW FTFulltime-RegularTRUE
7KEYSTONE POS PTParttime-RegularTRUE
8KEYSTONE POS FTParttime-RegularFALSE
9KEYSTONE POS FTFulltimeRegularTRUE
10KEYSTONE HMO LOW FTFulltimeRegularTRUE
11AMERIHEALTH HMO HIGH FTFulltime-RegularTRUE
12AMERIHEALTH HMO HIGH FTFulltime-TemporaryTRUE
Sheet2
 
Upvote 0
Would it always be before a hyphen if it were in the middle and would there be any other hyphens in the text?
 
Upvote 0

Forum statistics

Threads
1,224,585
Messages
6,179,704
Members
452,938
Latest member
babeneker

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