+ Reply to Thread
Results 1 to 6 of 6

Copying cell contents to another cell contingent upon there being data in the cell below

  1. #1
    Forum Contributor
    Join Date
    12-07-2013
    Location
    Staten Island, New York
    MS-Off Ver
    Excel 2010
    Posts
    106

    Copying cell contents to another cell contingent upon there being data in the cell below

    Hi everyone. I'm trying to set up excel so that if there is any data in the cell directly below the cell in question, the contents of the above cell get copied to another. Also, any cell with data to the furthest right takes precedence.

    So, for example, if there's any data in cell A2, I want the contents of the cell above it (in this case, A1) to be copied to another cell, such as R1. What's needed though is that only the rightmost cell with data has the cell above it copied to another.

    So, if there's data in A2, A1 copies to R1, but if there data in cell B2 then B1 gets copied to R1, and if there's data in C2 then C1 gets copied to R1, and so on..

    Can anyone give me a hand with this? Thanks!

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Copying cell contents to another cell contingent upon there being data in the cell bel

    You get better help on your question if you add a small excel file, without confidential information.

    Please also add manualy the expected result in your file.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Copying cell contents to another cell contingent upon there being data in the cell bel

    little code in Worksheet_Chance event

    Please Login or Register  to view this content.
    Kind regards
    Leo

  4. #4
    Forum Contributor
    Join Date
    12-07-2013
    Location
    Staten Island, New York
    MS-Off Ver
    Excel 2010
    Posts
    106

    Re: Copying cell contents to another cell contingent upon there being data in the cell bel

    Ok, I've attached an example file, which is just one sheet I cut out of my main file (with the business name changed). It's basically a calendar/ticket system. In cell AF9 is this formula:

    =LOOKUP(2, 1/($A9:$AE9<>""), $A9:$AE9)

    What it does is take the rightmost cell in that row with any content in it and displays it in cell AF9.

    As you can see, cell J9 has the word 'no' in it. As a result, the word 'no' is then displayed in cell AF9. If anything is put into any cell to the right of this cell (such as K9 - AE9), then that content becomes what is displayed in cell AF9.

    What I want is for the date above it to be copied to cell AF8. So in this case, because Aug - 10 in cell J8 is above cell J9 with content in it, the contents of cell J8 (in this case, 'Aug -10') get copied to cell AF8 (so that AF8 has 'Aug - 10' in it).

    If N9 has content in it, then I want the 'Aug -14' in cell N8 right above it to be copied to AF8. If cell R9 has content in it, I want the 'Aug - 18' in the cell above it to be copied to cell AF8, and so on..
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Copying cell contents to another cell contingent upon there being data in the cell bel

    in AF8

    Please Login or Register  to view this content.
    kind regards
    Leo

  6. #6
    Forum Contributor
    Join Date
    12-07-2013
    Location
    Staten Island, New York
    MS-Off Ver
    Excel 2010
    Posts
    106

    Re: Copying cell contents to another cell contingent upon there being data in the cell bel

    Many thanks, Mr. LeoTaxi! This does the trick. Thank you!

+ 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. Replies: 3
    Last Post: 06-29-2015, 03:03 PM
  2. [SOLVED] Data entry in cell contingent upon data input in another cell.
    By Armyguy7379 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-13-2015, 01:11 PM
  3. copying cell contents to new cell in new work sheet
    By Stujaxon in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-22-2012, 06:55 PM
  4. Replies: 2
    Last Post: 08-25-2012, 12:23 AM
  5. Data Validation Contingent on another cell
    By papaexcel in forum Excel General
    Replies: 2
    Last Post: 11-24-2009, 02:02 PM
  6. count cell value contingent on other cell conditions
    By MorkfromOrk in forum Excel General
    Replies: 7
    Last Post: 11-10-2008, 07:44 AM
  7. Replies: 1
    Last Post: 10-18-2005, 03:02 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