Results 1 to 3 of 3

Trying to find a value in a column, then select a range in that row to delete VBA

Threaded View

miltonsrevenge Trying to find a value in a... 12-06-2012, 02:00 AM
HaHoBe Re: Trying to find a value in... 12-06-2012, 02:13 AM
miltonsrevenge Re: Trying to find a value in... 12-06-2012, 03:01 AM
  1. #1
    Registered User
    Join Date
    12-04-2012
    Location
    Tennessee
    MS-Off Ver
    Excel 2010
    Posts
    3

    Trying to find a value in a column, then select a range in that row to delete VBA

    So I am working on a project where I need to find a UserForm ComboBox value on a worksheet, then select the range from that value (in Column A) to Column AD, then delete that selection and shift the cells up. Right now I have code to find the value but I can't figure out how to select that range of cells to delete. I am using this to find the value from the ComboBox.

    custid = cbo_customerid.Value

    If Trim(custid) <> "" Then
    With Sheets("Optimization Data").Range("A:A")
    Set custidopti = .Find(What:=custid, _
    After:=.Cells(.Cells.Count), _
    LookIn:=xlValues, _
    LookAt:=xlWhole, _
    SearchOrder:=xlByRows, _
    SearchDirection:=xlNext, _
    MatchCase:=False)

    So from this cell I need to select the entire row to AD to delete. Any help would be great!

    Thanks!
    Last edited by miltonsrevenge; 12-06-2012 at 03:03 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1