+ Reply to Thread
Results 1 to 8 of 8

Moving a selection of cells when a ref. to that selection is placed in another cell.

  1. #1
    Registered User
    Join Date
    04-12-2014
    Location
    Liverpool, England
    MS-Off Ver
    Excel 2003
    Posts
    5

    Question Moving a selection of cells when a ref. to that selection is placed in another cell.

    Hi All

    This is my first question I have been using some info. I have got from other peoples solutions but have not got the correct outcome for what I require. Would be greatful if someone could point me in the right direction as I am very new to excel/vba/macro programming but its starting to get me keen to try other stuff with excel.

    I have attached a jpg showing the excel sheet which has all the data on it. What I am looking to do is when a number is inserted into the cells (B27:B33) blue circle (1) I want the cells next to the same number above to be copied into the cells next to the number put in. The example is number 14 and the cells (C19:Y19) have been copied into (C27:Y27). The sheet is going to be used to work out and calculate the hours worked and hours paid etc. I have filled the days in manually to give a better idea of whats required, I am also going to lock the sheet so only the number boxes are active.

    I hope someone can help and am hoping this will give me a better idea of how to use programming to get better results from excel.

    Thanks all in advance.

    Ian E

    Shift Hour Calculation.jpg

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Moving a selection of cells when a ref. to that selection is placed in another cell.

    Untested:

    Please Login or Register  to view this content.

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Moving a selection of cells when a ref. to that selection is placed in another cell.

    Hi and welcome to the forum,

    Can I suggest you upload the workbook. Pictures are rarely much use for the reasons explained in the rules guidelines area, and most of us are not prepared to recreate your workbook when you have it readily available.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    04-12-2014
    Location
    Liverpool, England
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Moving a selection of cells when a ref. to that selection is placed in another cell.

    Hi Richard sorry about that I will post it soon as in work at minute so not at the computer to put it on cheers mate Ian E

    Sent from my HTC One using Tapatalk

  5. #5
    Registered User
    Join Date
    04-12-2014
    Location
    Liverpool, England
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Moving a selection of cells when a ref. to that selection is placed in another cell.

    Stnkynts I will check it out in a bit as replied to Richard am away from computer cheers mate

    Sent from my HTC One using Tapatalk

  6. #6
    Registered User
    Join Date
    04-12-2014
    Location
    Liverpool, England
    MS-Off Ver
    Excel 2003
    Posts
    5

    Smile Re: Moving a selection of cells when a ref. to that selection is placed in another cell.

    IE test.xlsx

    Here is the excel sheet

    Cheers

    Ian E

  7. #7
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Moving a selection of cells when a ref. to that selection is placed in another cell.

    Prime example of why it is easier for us to have a copy of the workbook. My previous code had errors that I couldn't easily test. Sorry about that, try this:

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    04-12-2014
    Location
    Liverpool, England
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Moving a selection of cells when a ref. to that selection is placed in another cell.

    Stnkynts

    Sorry for delay in reply been off work so only just got round nd to testing it out. What can I say mate you are a star works perfect big thank you 👍👍👍👍👍👍👍😃😃😃😃😃😃😃

    Sent from my HTC One using Tapatalk

+ 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. Autolock Cells from a Drop Down List Selection and a Calendar Selection
    By John Anderson in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-04-2013, 10:54 AM
  2. Replies: 3
    Last Post: 09-20-2012, 03:11 PM
  3. moving the cell selection in VB
    By GSP@DCS in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-21-2006, 06:30 PM
  4. Moving the Cell Selection Within AutoFilter
    By ajvasel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-13-2006, 11:05 AM
  5. Change from Column Selection to Cell Selection
    By Lil Pun in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-16-2006, 06:15 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