Question for those Excel experts!

dotcomer

New Member
Joined
Dec 18, 2013
Messages
27
So i have an excel spread sheet. I have a list of cities in column A. In Column H we have a list of cities we already mailed advertisements too. I need to remove the cities we already sent advertisements to from column H, out of column A.

So basically the cities in Column H are our bad cities. Column A is our good.

How do I remove the cities that are in Column H from Column A?
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

FDibbins

Well-known Member
Joined
Feb 16, 2013
Messages
6,723
Short answer - with VBA. Formulas do not affect other cells, only the 1's they reside it.

An alternative might be to use filters, then filter out the 1's you have already contacted?
 
Upvote 0

Amanda Wilso

Board Regular
Joined
Dec 18, 2016
Messages
132
Manually, you can use data filtering to determine the unique values. Make sure the column has a label at the top of it, then select a cell in the column. Display the Data tab of the ribbon and click Advanced in the Sort & Filter group. Use the controls in the resulting dialog box to specify that you want to copy the unique values to another location which you specify.
You can also use a formula to manually determine the duplicates in the list. Sort the values in the column, and then enter the following formula in cell B2:
=IF(A1=H1,"Duplicate","")
 
Upvote 0

dotcomer

New Member
Joined
Dec 18, 2013
Messages
27
ADVERTISEMENT
How to filter it? All i know how to do is remove duplicates
 
Upvote 0

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
68,097
Office Version
  1. 365
Platform
  1. Windows
ADVERTISEMENT
Is there not any formula to just remove the cities in column A that are in Column H?
What Ford said in his first line is correct:
Short answer - with <acronym title="visual basic for applications" style="border-width: 0px 0px 1px; border-top-style: initial; border-right-style: initial; border-bottom-style: dotted; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-bottom-color: rgb(0, 0, 0); border-left-color: initial; border-image: initial; cursor: help; color: rgb(51, 51, 51); background-color: rgb(250, 250, 250);">VBA</acronym>. Formulas do not affect other cells, only the 1's they reside it.
Excel formulas cannot remove anything. All they can do is calculate and return something to the cell that the formula itself resides in.

You got some good suggestions on how to handle it:
- With VBA
- With Filters
- A roundabout, manual solution using formulas (i.e. identifying duplicates, then maybe manually deleting them)

I can add another potential solution - use Microsoft Access instead.
This is a simple "Unmatched Query" in Access. There is even a Wizard in Access to walk your through setting it up.
 
Upvote 0

FDibbins

Well-known Member
Joined
Feb 16, 2013
Messages
6,723
How to filter it? All i know how to do is remove duplicates

Make sure your entire data range is highlighted (in case there are any empty cells to mess things around)
Click the HOME tab/Editing/Sort and Filter/Filter
you will see all your heading row cells now have a small drop-down in them, click the 1 you want to filter on and uncheck whatever needs to be unselected to show what you need
 
Upvote 0

dotcomer

New Member
Joined
Dec 18, 2013
Messages
27
I seen what the first line was but never even heard of VBA. What about highlighting whats in Column H and A. If the value exist in Column H can I highlight those in column A? Let me rephrase this, I know I can but how
 
Last edited:
Upvote 0

Forum statistics

Threads
1,195,936
Messages
6,012,393
Members
441,695
Latest member
MickRobertson

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