+ Reply to Thread
Results 1 to 6 of 6

Auto-Delete/Shift Cells Up?

  1. #1
    Registered User
    Join Date
    02-23-2014
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    5

    Auto-Delete/Shift Cells Up?

    I have a spreadsheet containing 3 columns, "A" "B" "C"
    Columns "A" and "B" contain unique text
    Column "C" contains "yes" or "no"

    I made a formula on another spreadsheet in column A (let's call it New A where IF column C on the first spreadsheet says "no", the contents of Column A are copied onto New A

    It basically looks like this (assume the column New A is in a separate sheet)


    A B C _ New A
    1 text1 textA yes _
    2 text2 textB yes _
    3 text3 textC no _ text3
    4 text4 textD yes _
    5 text5 textE no _ text5
    6 text6 textF no _ text6
    7 text7 textG yes _

    Now, my question is, can I have excel automatically remove the spaces present in New A and shift all cells up accordingly? If so, how?

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Auto-Delete/Shift Cells Up?

    The best way is to copy them contiguously onto your New A - post your code and I'll see if I can alter it
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    02-23-2014
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Auto-Delete/Shift Cells Up?

    @xladept
    Sorry, but what do you mean by "copy your code"?

  4. #4
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Auto-Delete/Shift Cells Up?

    To do anything like this 'automatically' in Excel, you need to use VBA. You can't automate deleting rows by just using formulas.

    Have you written any VBA code yet? This is what xladept was asking you for...
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  5. #5
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Auto-Delete/Shift Cells Up?

    If you want to delete the entire rows in your second sheet, based on the blanks in column A, try something like this:
    Please Login or Register  to view this content.
    If you only want to delete the cells in Column A, then try this:
    Please Login or Register  to view this content.
    Last edited by Olly; 02-26-2014 at 09:54 PM.

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Auto-Delete/Shift Cells Up?

    post your code and I'll see if I can alter it
    This is what I actually said, what I actually meant was post your formula with code tags.

    But, Olly should be able to fix you up

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] What is the shortcut for Delete, Shift cells up?
    By steveyeoks in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-27-2024, 12:26 PM
  2. VBA Delete range and shift cells up
    By jbmerrel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-18-2013, 06:14 PM
  3. [SOLVED] Find cells which contain specific word, delete cells and shift left.
    By BPSJACK in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-24-2012, 07:00 AM
  4. Delete cells and shift up
    By smiso24 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-07-2009, 03:51 PM
  5. [SOLVED] Delete - Shift Cells UP problem
    By Ralph in forum Excel General
    Replies: 3
    Last Post: 03-22-2005, 08:08 PM

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