Avatar of Jagwarman
Jagwarman
 asked on

Remove data from a [hidden] list

I am using the below to add to a hidden list. Could a Expert provide me with VBA code that will enable data to be removed from the list.

So lets say in A30 it has Yellow and B30 Blue

If I want to remove this the a pop-up that asks for what is in column A so if I put Yellow it will remove data from A30 and B30 and then shift those cells up but not affect any other columns.

Thanks
Microsoft ExcelVBA

Avatar of undefined
Last Comment
Jagwarman

8/22/2022 - Mon
Jagwarman

ASKER
forgot to put the code I am using:

With Sheets("Static")
    .Range("A" & .Range("A" & Rows.Count).End(xlUp).Row+1).Value = InputBox("Please enter a value for cell A" & .Range("A" & Rows.Count).End(xlUp).Row+1)
    .Range("B" & .Range("B" & Rows.Count).End(xlUp).Row+1).Value = InputBox("Please enter a value for cell B" & .Range("B" & Rows.Count).End(xlUp).Row+1)
End With
Rgonzo1971

Hi,

pls try

With Sheets("Static")
    strFind = InputBox("Please enter a value to delete in Column A")
    Set f = .Range("A:A").Find(strFind, LookIn:=xlValues, LookAt:=xlWhole, MatchCase:=False)
    If Not f Is Nothing Then
        f.EntireRow.Delete
    Else
        MsgBox strFind & " not found"
    End If
End With

Open in new window

Regards
Jagwarman

ASKER
Hi Rgonzo, thanks only thing is I only want it to delete A and B as mentioned in original request.....remove data from A30 and B30 and then shift those cells up but not affect any other columns.


Thanks
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
ASKER CERTIFIED SOLUTION
Rgonzo1971

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Jagwarman

ASKER
excellent many thanks