IF functions slightly too complicated for my tiny brain

MrSak87

New Member
Joined
Jan 8, 2015
Messages
44
Hey guys,

Literally had no idea of what to put for the title of this one but here it goes. So in a separate column say column E I want a formula that returns "true" when the following condition is met:

B1 occurs for the first time in a unit but not any other time unless the unit changes. Units are from A1 downwards (numbers 1,2 and 3 in this example) If B1 occurs again but the unit hasn't changed then I don't want "true" to appear.

So in the example below E1 would = false, E2 would equal true, Then false all the way to E10, true for E11 etc.

unit
1SANDP1
1SANDP1B1B1
1SANDP1Q1Q1
1SANDP1U1U1
1SANDP1B2B2
1SANDP2
1SANDP2B1B1
1SANDP2B2B2
2CLAYP2Q1Q1
2CLAYP3
2CLAYP3B1B1
2CLAYP3Q1Q1
2CLAYP3U1U1
2CLAYP4
2CLAYP4B1B1
2CLAYP4Q1Q1
2CLAYP4Q2Q2
2CLAYP5
2CLAYP5B1B1
3CLAYP5U1U1
3CLAYP5Q1Q1
3CLAYP5B2B2
3CLAYP6
3CLAYP6B1B1
3CLAYP6Q1Q1
3CLAYP6B2B2
3CLAYP7
3SANDP7B1B1
3CLAYP7B2B2
3CLAYP7U1U1
3CLAYP7Q1Q1
3CLAYP7B3B3

<tbody>
</tbody>


Sorry if the explanation is rubbish but I think you'll get the idea. Cheers!
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
As long as you don't have the same unit number against more than 1 item in col B


=IF(COUNTIF($B$1:B1,B1)=2,"TRUE","FALSE")
 
Upvote 0
Try this (edited)

E1
=IF(D1="B1",IF(COUNTIFS(A$1:A1,A1,D$1:D1,"B1")=1,TRUE,FALSE),FALSE)

copy down

M.
 
Upvote 0
try in column E


=IF(AND(D2="B1", COUNTIF($E$1:E1,TRUE)<A2),TRUE,FALSE)


followed by lessthan symbol + "A2) ",TRUE,FALSE)"
<A2),TRUE,FALSE)< html>

keeps disappearing
 
Last edited:
Upvote 0
OK so A,B,C,D across the top and the values start at 2

Ok, is this what we should get?

unitxyz
1SANDP1 TRUE
1SANDP1B1B1FALSE
1SANDP1Q1Q1FALSE
1SANDP1U1U1FALSE
1SANDP1B2B2FALSE
1SANDP2 FALSE
1SANDP2B1B1FALSE
1SANDP2B2B2FALSE
2CLAYP2Q1Q1TRUE
2CLAYP3 FALSE
2CLAYP3B1B1FALSE
2CLAYP3Q1Q1FALSE
2CLAYP3U1U1FALSE
2CLAYP4 FALSE
2CLAYP4B1B1FALSE
2CLAYP4Q1Q1FALSE
2CLAYP4Q2Q2FALSE
2CLAYP5 FALSE
2CLAYP5B1B1FALSE
3CLAYP5U1U1TRUE
3CLAYP5Q1Q1FALSE
3CLAYP5B2B2FALSE
3CLAYP6 FALSE
3CLAYP6B1B1FALSE
3CLAYP6Q1Q1FALSE
3CLAYP6B2B2FALSE
3CLAYP7 FALSE
3SANDP7B1B1TRUE
3CLAYP7B2B2TRUE
3CLAYP7U1U1FALSE
3CLAYP7Q1Q1FALSE
3CLAYP7B3B3FALSE

<COLGROUP><COL style="WIDTH: 48pt" span=5 width=64><TBODY>
</TBODY>
 
Upvote 0
Sorry non of these solutions appear to work. With Marcelos I get #NAME? on every "B1" and the other formula Charles' formula is incomplete. If I complete it I get a 0 on every "B1"
 
Upvote 0

Forum statistics

Threads
1,215,561
Messages
6,125,533
Members
449,236
Latest member
Afua

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