Delete cell content based on adjacent cell value

Anarki

New Member
Joined
Oct 9, 2006
Messages
5
Hi Guys

I am trying to create some code for a mcaro but lack the knowledge to put it all together

I have column B filled with a name in each cell
I have column C filled with a number adjacent to each name in column B (Not all names have data in the adjacent cell)

I need to delete the data from each cell in column B if its adjacent cell in column C is blank

Any ideas how i can put this together?

Your help is greatly appreciated

Thanks,
Mick
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
try the following code

Code:
Range("B1").Select
Do While Not IsEmpty(ActiveCell)
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
Loop
ActiveCell.EntireRow.Select
Selection.Delete Shift:=xlUp
ActiveCell.Offset(0, 1).Select
Loop
 
Upvote 0
Boller your code works great! thanks so much for the quick response

Damnnnn i was not able to get your code to work properly but thanks for help
 
Upvote 0

Forum statistics

Threads
1,214,621
Messages
6,120,563
Members
448,972
Latest member
Shantanu2024

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