Comparing two columns

rainmantwo

New Member
Joined
Jun 13, 2002
Messages
45
I have a ss and which I need to compare two columns - column c and column n before I concatenate them. How do I compare the two columns and if there the same, do not contcatenate them.

If this is not possible in a concatenate statement, is it possible to compare column and column n and if they match, delete the corresponding cell in column n.

I am new to Excel and VB and would appreciate any help you can offer.

Thanks - Brian
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

PaddyD

MrExcel MVP
Joined
May 1, 2002
Messages
14,234
=if(c1=n1,"Do not concatenate",c1&n1)

edit: missed the ..delete if match bit...will leave the vba to someone else.
 

rainmantwo

New Member
Joined
Jun 13, 2002
Messages
45
Don't understand

Thanks for the help. but I do not understand. I am looking to compare to column and if they are not the same to concatenate them.

Thanks :biggrin:
 

Forum statistics

Threads
1,136,263
Messages
5,674,710
Members
419,521
Latest member
Jasonnie

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
Top