How can you word this statement?

Desu Nota from Columbus

Well-known Member
Joined
Mar 17, 2011
Messages
556
I am trying to write an If statement:

If any cell in column A equals or matches another cell in column A.....blah blah blah.


The values in Column A are numbers but they could potentially be text/date etc... There can be an infinite amount of duplicates (but there wont be).

Ex. If A1 = (any other cell in Column A), perform F(x).
If A5 = (any other cell in Column A), perform F(x).

I know how to write the end part of the if statement, but I don't know the beginning.

HELP ME!!

Thanks
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
First off, thank you for the response.

I got that to work i believe. Is my thinking correct below?

Now this says,

if A1 is a duplicate of any other cell in column A AND b1 has an "s"....

=IF(AND((COUNTIF(A:A,A1)>1), B1="s"),


How do I get this to do the following:

put a Y in C1 if true

copy b1 to c1 if false
 
Upvote 0
One last caveat, this formula isn't going in column C, so i believe just putting "Y" and B1 won't work. Is there a way to specifically change them through this if statement?
 
Upvote 0
I think I've lost the plot, sorry.


I guess i am wondering if you can put this IF statement into Column AZ, and make it change Column C?


For this to be possible I believe the end of this formula (in blue) would have to explicitly state:

set C1="Y"------(for True), set c1=b1------(for false)


=IF(AND((COUNTIF(A:A,A1)>1), B1="s"), "Y",B1)
 
Upvote 0
No, the formula would need to go in column C. What is the problem with doing that?
 
Upvote 0

Forum statistics

Threads
1,224,606
Messages
6,179,862
Members
452,948
Latest member
UsmanAli786

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