COUNTIF would solve this? Tricky one.

Lukums

Board Regular
Joined
Nov 23, 2015
Messages
195
G'day,

Another tricky one in my mind.

I have 100 jobs multiple lines per job with the same JOBID found in column A starting in A2.

I also have a description of material in Column W. Starting at W2.

What I need to do is if the BLOCK is the same job ID (column a) and "Ridge300" is found in Column W then AC column needs to be "1" against each row which matches this criteria.

Looking something like this: Thanks for your help!

[TABLE="width: 500"]
<tbody>[TR]
[TD]JOB ID[/TD]
[TD]Machine[/TD]
[TD]FLAG[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]xxx[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Ridge300[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]xxx[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]xxx[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]xxx[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]25[/TD]
[TD]Ridge300[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]25[/TD]
[TD]xxx[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]25[/TD]
[TD]xxx[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Ridge400[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]xxx[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]xxx[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]xxx[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]xxx[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]xxx[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]xxx[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]xxx[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Ridge300[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]xxx[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]xxx[/TD]
[TD]1[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Hi,

If you have COUNTIFS:


Book1
AWAC
1JOB IDMachineFLAG
21xxx1
31Ridge3001
41xxx1
51xxx1
61xxx1
725Ridge3001
825xxx1
925xxx1
103Ridge400
113xxx
123xxx
133xxx
143xxx
155xxx1
165xxx1
175xxx1
185Ridge3001
195xxx1
205xxx1
Sheet225
Cell Formulas
RangeFormula
AC2=IF(COUNTIFS(A$2:A$20,A2,W$2:W$20,"Ridge300"),1,"")


Adjust cell references/range as needed, formula copied down.
 
Upvote 0
Hi,

If you have COUNTIFS:

AWAC
JOB IDMachineFLAG
xxx
Ridge300
xxx
xxx
xxx
Ridge300
xxx
xxx
Ridge400
xxx
xxx
xxx
xxx
xxx
xxx
xxx
Ridge300
xxx
xxx

<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: center"]2[/TD]
[TD="align: right"]1[/TD]

[TD="align: right"]1[/TD]

[TD="align: center"]3[/TD]
[TD="align: right"]1[/TD]

[TD="align: right"]1[/TD]

[TD="align: center"]4[/TD]
[TD="align: right"]1[/TD]

[TD="align: right"]1[/TD]

[TD="align: center"]5[/TD]
[TD="align: right"]1[/TD]

[TD="align: right"]1[/TD]

[TD="align: center"]6[/TD]
[TD="align: right"]1[/TD]

[TD="align: right"]1[/TD]

[TD="align: center"]7[/TD]
[TD="align: right"]25[/TD]

[TD="align: right"]1[/TD]

[TD="align: center"]8[/TD]
[TD="align: right"]25[/TD]

[TD="align: right"]1[/TD]

[TD="align: center"]9[/TD]
[TD="align: right"]25[/TD]

[TD="align: right"]1[/TD]

[TD="align: center"]10[/TD]
[TD="align: right"]3[/TD]

[TD="align: center"]11[/TD]
[TD="align: right"]3[/TD]

[TD="align: center"]12[/TD]
[TD="align: right"]3[/TD]

[TD="align: center"]13[/TD]
[TD="align: right"]3[/TD]

[TD="align: center"]14[/TD]
[TD="align: right"]3[/TD]

[TD="align: center"]15[/TD]
[TD="align: right"]5[/TD]

[TD="align: right"]1[/TD]

[TD="align: center"]16[/TD]
[TD="align: right"]5[/TD]

[TD="align: right"]1[/TD]

[TD="align: center"]17[/TD]
[TD="align: right"]5[/TD]

[TD="align: right"]1[/TD]

[TD="align: center"]18[/TD]
[TD="align: right"]5[/TD]

[TD="align: right"]1[/TD]

[TD="align: center"]19[/TD]
[TD="align: right"]5[/TD]

[TD="align: right"]1[/TD]

[TD="align: center"]20[/TD]
[TD="align: right"]5[/TD]

[TD="align: right"]1[/TD]

</tbody>
Sheet225

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]AC2[/TH]
[TD="align: left"]=IF(COUNTIFS(A$2:A$20,A2,W$2:W$20,"Ridge300"),1,"")[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]



Adjust cell references/range as needed, formula copied down.

You sir - are amazing thank you so much exactly what I needed ! thank you thank you!:eeek:
 
Upvote 0
You're quite welcome, glad to help, thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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