+ Reply to Thread
Results 1 to 10 of 10

delete numbers and replace with numbers from adjacent column

  1. #1
    Registered User
    Join Date
    02-09-2010
    Location
    knottingley england
    MS-Off Ver
    Office 365 Excel
    Posts
    53

    delete numbers and replace with numbers from adjacent column

    Is it possible to delete a column of numbers then replace those numbers from adjacent columns and the adjacent columns are then filled with the numbers adjacent to them and so on
    regards Troysie

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: delete numbers and replace with numbers from adjacent column

    You've oversimplified your sheet. There needs to be more variety in the data we're looking at. Also, since your macro doesn't actually work, use BEFORE/AFTER sheets to demonstrate what you want to occur.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    02-09-2010
    Location
    knottingley england
    MS-Off Ver
    Office 365 Excel
    Posts
    53

    Re: delete numbers and replace with numbers from adjacent column

    There will only ever be ones or blanks in the cells
    Please find attached before and after
    Regards Troysie
    Attached Files Attached Files

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: delete numbers and replace with numbers from adjacent column

    OK. Your command button already achieves the "after". What do you need from us?

  5. #5
    Registered User
    Join Date
    02-09-2010
    Location
    knottingley england
    MS-Off Ver
    Office 365 Excel
    Posts
    53

    Re: delete numbers and replace with numbers from adjacent column

    sorry iam not explaining this correctly. when i press the command button i want the column deleting and replacing with the e column and the column replacing with the f column.i put the after in the wrong columns. please find attached new before and after.every time d column is deleted i want the next column to advace into d column and so on at the moment it just deletes d column
    hope this is a bit clearer
    Regards Troysie
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: delete numbers and replace with numbers from adjacent column

    Do you mean like this?
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    02-09-2010
    Location
    knottingley england
    MS-Off Ver
    Office 365 Excel
    Posts
    53

    Re: delete numbers and replace with numbers from adjacent column

    That is basically what I require but now i have incorporated it into my worksheet it drags the fill colour behind it. i have only applied the code to thfirst five rows up to now
    Please find attached sheet
    Regards Troysie
    Attached Files Attached Files

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: delete numbers and replace with numbers from adjacent column

    Try this:
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    02-09-2010
    Location
    knottingley england
    MS-Off Ver
    Office 365 Excel
    Posts
    53

    Re: delete numbers and replace with numbers from adjacent column

    Thankyou that is exactly what I need
    Regards Troysie

  10. #10
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: delete numbers and replace with numbers from adjacent column

    If that takes care of your need, be sure to EDIT your original post, click Go Advanced and mark the PREFIX box [SOLVED].

+ Reply to Thread

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