+ Reply to Thread
Results 1 to 5 of 5

(VBA) Move selected cell one to the LEFT

  1. #1
    Registered User
    Join Date
    08-09-2019
    Location
    Brussels, Belgium
    MS-Off Ver
    2010
    Posts
    2

    (VBA) Move selected cell one to the LEFT

    Hi,
    I created a worksheet in excel to calculate my offers to my customers. Each offer is then SAVED into a separate database (new excel sheet) , one row per offer.

    The strategy I use is that I simply link the values from my worksheet into the very first row of my database (A1:Q1)

    Whereafter I run the following code :
    Please Login or Register  to view this content.
    -----------------
    note: .Range("B1") has to be B1 for a specific reason. I know I can fix it by changing the value to A1, but that is not what I need.
    The above code searches for the first EMPTY row in the database so it can paste the new offer in an empty row.
    However, I need to first move one cell te the left --> A# because my current selection is on the B# column. Otherwise my offer is pasted incorrectly and doesnt align with the others.
    - I also understand I need to enter the correct code in this area, hence why I am typing in between the code.
    -----------------
    Please Login or Register  to view this content.
    I hope I explained it correctly and thanks to help me out.

    Michael
    Last edited by davesexcel; 08-09-2019 at 08:23 AM.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,475

    Re: (VBA) Move selected cell one to the LEFT

    From looking at the code, I belive this is workable.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    08-09-2019
    Location
    Brussels, Belgium
    MS-Off Ver
    2010
    Posts
    2

    Re: (VBA) Move selected cell one to the LEFT

    Hi Dave,

    Thanks for your reply!

    Which bit of code makes the cell move from B to A before pasting the contents?
    because if I'm reading this correctly, this code does exactly the same as mine, however with cleaner code.
    Last edited by AliGW; 08-09-2019 at 09:17 AM. Reason: Please don't quote unnecessarily!

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,475

    Re: (VBA) Move selected cell one to the LEFT

    Welcome to the forum

    Please attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  5. #5
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,516

    Re: (VBA) Move selected cell one to the LEFT

    Would the following not do what I understand you want to do
    Please Login or Register  to view this content.
    Change the "Sheet2" reference to the sheet name where you want to copy into.

+ 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. Formula to move data to Left when LEFT cell is blank?
    By wer5150 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-31-2019, 05:26 AM
  2. Formula to move data to Left when LEFT cell is blank?
    By wer5150 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-31-2019, 05:22 AM
  3. [SOLVED] How to move the content of the cell from right to the left
    By AlexanderCH in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 12-28-2016, 11:40 AM
  4. cell data move to left
    By lapot in forum Excel General
    Replies: 3
    Last Post: 05-18-2007, 08:04 PM
  5. [SOLVED] Move contents of selected cell down one, and to the left one cell?
    By Albert Einstein in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-17-2006, 01:20 PM
  6. [SOLVED] HOW TO: Move a picture to the top left or top right of a cell via
    By Kevin McCartney in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-10-2006, 12:50 PM
  7. selected cell - top left
    By Ciara in forum Excel General
    Replies: 1
    Last Post: 05-25-2005, 07:19 AM

Tags for this Thread

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