If statement

bwlytkr

Board Regular
Joined
Jun 8, 2012
Messages
175
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Does anyone know of a formula I can use to remove rows if statement is true. Ex. If value in column g is 622m and column D's value is duplicated in column D then place a 1 in cell if true. below is a sample
TNW POLE 8TH ST NJUNS# 1748092 TRI-PLEX COIL ON POLE. MTEMC JOINT USE AGREEMENT. 3 DROPS, 1 DOWN GUY PWO PWO6E3G81 MURFREESBORO 2MTRNSFR0OP
TNW POLE 8TH ST NJUNS# 1748092 TRI-PLEX COIL ON POLE. MTEMC JOINT USE AGREEMENT. 3 DROPS, 1 DOWN GUY PWO PWO6E3G81 MURFREESBORO 622MMOVE3OP
<colgroup><col width="84" style="width: 63pt; mso-width-source: userset; mso-width-alt: 3072;" span="3"> <col width="80" style="width: 60pt; mso-width-source: userset; mso-width-alt: 2925;"> <col width="84" style="width: 63pt; mso-width-source: userset; mso-width-alt: 3072;" span="6"> <tbody> </tbody>
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
To identify multiples you could use COUNTIFS

=IF(COUNTIFS($D:$D,$D1)=1,0,1)
in the first row and copy down (change the $D1 to whatever row its in)
 
Upvote 0
This seems to just put a 1 in the cell if column D is duplicate. I need it to look in Column G first to search for the 622M then look in Column D to see if the corresponding cell in that row is duplicated in Column D and if so place 1 or 0
 
Upvote 0
Hi,

May be you mean this?


Excel 2010
ACDEFGHIJK
1TNWPWOPWO6E3G81MURFREESBORO2MTRNSFR0OP0
2TNWPWOPWO6E3G81MURFREESBORO622MMOVE3OP1
Sheet2
Cell Formulas
RangeFormula
K1=IF(AND(G1="622M",COUNTIF(D$1:D$1000,D1)),1,0)


K1 formula copied down. I used the range D$1:D$1000, adjust to your data range.
 
Upvote 0
You're welcome.

Actually, just realized, we don't even need the IF statement, this will do as well:


Excel 2010
ACDEFGHIJM
1TNWPWOPWO6E3G81MURFREESBORO2MTRNSFR0OP0
2TNWPWOPWO6E3G81MURFREESBORO622MMOVE3OP1
Sheet2
Cell Formulas
RangeFormula
M1=--AND(G1="622M",COUNTIF(D$1:D$1000,D1))
 
Upvote 0

Forum statistics

Threads
1,214,585
Messages
6,120,399
Members
448,957
Latest member
Hat4Life

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