+ Reply to Thread
Results 1 to 5 of 5

Paste certain files to a sheet where cells are merged

  1. #1
    Forum Contributor
    Join Date
    01-17-2011
    Location
    amsterdam, Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    189

    Paste certain files to a sheet where cells are merged

    How do I copy certain cells from column B (cells that have a value in column C), to sheet 2.

    The difficult part is that in sheet 2 cells are merged. How will I do that?

    In the attachment I made an example,

    Sheet 1 contains all the information
    Sheet 2 is where certain information has to be paste. (difficult part is that cells are merged here)
    I only want to paste the cells from column B that contain a number in column C.

    To make it more clear, I made what it should be in sheet 3.

    Hope someone can help me!

    ALSO A second excel sheet, with a almost working formula
    Attached Files Attached Files
    Last edited by keis386; 05-12-2012 at 07:56 PM.

  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: Paste certain files to a sheet where cells are merged

    1) unfilter the sheet1
    2) Add this formula in D2 and copy down
    =COUNT($C$1:$C2)

    3) on Sheet2, put this formula in B2 (merged cell) and copy down:

    =INDEX(Sheet1!$B:$B, MATCH(CEILING((ROW()-1)/3,1), Sheet1!$D:$D, 0))


    To copy down further than needed but not get errors, use this instead:

    =IFERROR(INDEX(Sheet1!$B:$B, MATCH(CEILING((ROW()-1)/3,1), Sheet1!$D:$D, 0)), "")
    _________________
    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
    Forum Contributor
    Join Date
    01-17-2011
    Location
    amsterdam, Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    189

    Re: Paste certain files to a sheet where cells are merged

    Thanks for helping!

    But it works not totaly. I applied the formula but I do not get all the values. In my post I posted a second excelsheet where I applied your formjulas. Can you look at it what is missing?
    Thanks very much!

  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: Paste certain files to a sheet where cells are merged

    You have to set the formula to divide by the number of merged cells.

    =IFERROR(INDEX(Sheet1!$B:$B, MATCH(CEILING((ROW()-1)/3,1), Sheet1!$D:$D, 0)), "")


    I presume you need to change that to 4

  5. #5
    Forum Contributor
    Join Date
    01-17-2011
    Location
    amsterdam, Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    189

    Re: Paste certain files to a sheet where cells are merged

    Thanks very much, my boss would be very happy with the result!

+ 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