Logic Question - Deletion of cell value

Ark68

Well-known Member
Joined
Mar 23, 2004
Messages
4,538
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I have a dynamic list of values that fill 'x' number of cells in a single column (C).
If I have a user enter a number in A4, how would I go about deleting that same number from column C and having the data below that value move up to fill the vacant cell? (move cells up)?

Jenn
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Try

Code:
Sub test()
Dim Found As Range
Set Found = Columns("C").Find(what:=Range("A4").Value, lookat:=xlWhole)
If Not Found Is Nothing Then Found.Delete shift:=xlShiftUp
End Sub
 
Upvote 0
Thank you VoG ...

I'm getting a "Delete Method of Range Class Failed" error on:
Code:
If Not Found Is Nothing Then Found.Delete shift:=xlShiftUp

Jenn
 
Upvote 0

Forum statistics

Threads
1,203,596
Messages
6,056,195
Members
444,850
Latest member
dancasta7

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