Results 1 to 14 of 14
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Posts
    1,418
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Please see attached. I am trying to come up with a formula that will "transpose" or link the data in worksheets A-E into a summary Sheet 1. In addition, the data in worksheets B, D & E should be transposed or linked to Sheet 1 as negative numbers. Any ideas? I have been trying sumproduct, but can't seem to get the syntax right. Any ideas?
    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Sheets A...E don't indicate the year. Are the data for January 2006 through March 2007? Or for January 2007 through March 2008? Or ...?

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Posts
    1,418
    Thanks
    1
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='775683' date='18-May-2009 07:31']Sheets A...E don't indicate the year. Are the data for January 2006 through March 2007? Or for January 2007 through March 2008? Or ...?[/quote]

    Sorry Hans. The data on sheets A-E are for the period January 2007 through March 2008.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    In B2:

    =IF(OR(B$1="A",B$1="C"),1,-1)*OFFSET(INDIRECT("'"&B$1&"'!A3"),DAY($A2),MONTH( $A2)+12*(YEAR($A2)=2008))

    Fill right to F2, then down as far as needed.

  5. #5
    Bronze Lounger
    Join Date
    Jan 2001
    Posts
    1,418
    Thanks
    1
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='775697' date='18-May-2009 08:40']In B2:

    =IF(OR(B$1="A",B$1="C"),1,-1)*OFFSET(INDIRECT("'"&B$1&"'!A3"),DAY($A2),MONTH( $A2)+12*(YEAR($A2)=2008))

    Fill right to F2, then down as far as needed.[/quote]

    Thanks Hans. Works like a charm, and so easy!!!!!

  6. #6
    Bronze Lounger
    Join Date
    Jan 2001
    Posts
    1,418
    Thanks
    1
    Thanked 0 Times in 0 Posts
    [quote name='jlkirk' post='775707' date='18-May-2009 09:31']Thanks Hans. Works like a charm, and so easy!!!!![/quote]

    Hi Hans. Thanks again for your help. I have now run into a slight variation on the original problem. Instead of "transposing" the data to Sheet1 in the same worbook, I need to "transpose" the data to Sheet1 of another, separate workbook, that let's call Workbook2. How would I change the formula? I have tried several ways, but nothing seems to work. The cell locations on Sheet1 of Workbook2 would be the same as originally posed.
    Thanks again.

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    The formula would become

    =IF(OR(B$1="A",B$1="C"),1,-1)*OFFSET(INDIRECT("'[Jeff_Test.xls]"&B$1&"'!A3"),DAY($A2),MONTH($A2)+12*(YEAR($A2)=20 08))

    where Jeff_Test.xls is the workbook with the A, B, C, D and E sheets.

    Warning: the formulas will only work if the other workbook is open. The INDIRECT function doesn't work with closed workbooks.

  8. #8
    Bronze Lounger
    Join Date
    Jan 2001
    Posts
    1,418
    Thanks
    1
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='776061' date='20-May-2009 06:27']The formula would become

    =IF(OR(B$1="A",B$1="C"),1,-1)*OFFSET(INDIRECT("'[Jeff_Test.xls]"&B$1&"'!A3"),DAY($A2),MONTH($A2)+12*(YEAR($A2)=20 08))

    where Jeff_Test.xls is the workbook with the A, B, C, D and E sheets.

    Warning: the formulas will only work if the other workbook is open. The INDIRECT function doesn't work with closed workbooks.[/quote]

    Thanks Hans. I knew there was a problem with the SUMIF function when the other workbook wasn't open (use the SUM9IF( instead). Any workaround for the INDIRECT function?

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    The free add-in Morefunc contains - among others - a function INDIRECT.EXT that has the same function as INIDRECT but that works with closed workbooks too.
    Downside is that every user of the workbook will have to install the add-in.

  10. #10
    Bronze Lounger
    Join Date
    Jan 2001
    Posts
    1,418
    Thanks
    1
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='776067' date='20-May-2009 06:41']The free add-in Morefunc contains - among others - a function INDIRECT.EXT that has the same function as INIDRECT but that works with closed workbooks too.
    Downside is that every user of the workbook will have to install the add-in.[/quote]

    Slight problem: as I indicated earlier, the data covers 15 months from January 2007 through March 2008. However, when I plugged in your formula, the data started repeating itself on 1/1/2008 (i. e., the same data as 1/1/2008). Any ideas?

  11. #11
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts
    Cross posted at MrExcel here, by the way.
    Regards,
    Rory

    Microsoft MVP - Excel

  12. #12
    Bronze Lounger
    Join Date
    Jan 2001
    Posts
    1,418
    Thanks
    1
    Thanked 0 Times in 0 Posts
    [quote name='rory' post='776085' date='20-May-2009 08:18']Cross posted at MrExcel here, by the way.[/quote]

    I posted this same message on Mr Excel: "Thanks for pointing this out Rory. Yes I do cross-post certain topics to get a feel for the different views. As you can see from the answers, the answers are quite different. I didn't realize there was a policy on either this or Woody's Board that frowns on this practice. I have come to appreciate and look to both Boards for guidance in all Office matters. I apologize for any offense."

    Again, I apologize for any offense that anyone has with my actios.

  13. #13
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts
    We (the Lounge) don't, AFAIK, have any rule against cross posting on different sites, so I don't think anyone is taking offense. It's just helpful to mention that you have done so, not least so that others could also benefit from the different responses. At MrExcel it's much the same philosophy, I think. It also helps people not to spend time coming up with the same answer you already got somewhere else!
    Regards,
    Rory

    Microsoft MVP - Excel

  14. #14
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    [quote name='jlkirk' post='776082' date='20-May-2009 15:12']Slight problem: as I indicated earlier, the data covers 15 months from January 2007 through March 2008. However, when I plugged in your formula, the data started repeating itself on 1/1/2008 (i. e., the same data as 1/1/2008). Any ideas?[/quote]
    Make sure that you have filled down the formulas correctly and that you haven't turned off automatic calculation. The formulas DO work correctly - I have just tested them again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •