Merging two ranges

I have a spreadsheet that has sales layed out with one year per row like this:
Sales Monthly
Year
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2012
100
125
30
90
100
174
123
251
122
135
123
345
2013
124
156
142
135
135
12
75
124
98
2014
89
196
34
Indexes
1
2
3
I would like to use the forecast function to get the forecast for the coming months and years. For example, to get the forecast for October 2013, I am using this:
=FORECAST(4,Sales Monthly :: E3:J3, Indexes :: $A$1:$C$1)
My issue comes when I try to use a similar function to get the forecast for April 2014. I'd like to join these ranges for the second argument in the forecast function:
Sales Monthly :: K3:M3
     and
Sales Monthly :: B4:D4
I've tried:
=FORECAST(4,(Sales Monthly :: K3:M3,Sales Monthly :: B4:D4) , Indexes :: $A$1:$C$1)
=FORECAST(4,(Sales Monthly :: K3:M3+Sales Monthly :: B4:D4) , Indexes :: $A$1:$C$1)
=FORECAST(4,(Sales Monthly :: K3:M3&Sales Monthly :: B4:D4) , Indexes :: $A$1:$C$1)

I think it would be easier to place all the data in a pair of columns (one for date and one for Sales). Add a third column which computes the forecast.
Make a second table (Maybe called "Summary") which arranges the data as shown in your original post.
I this example I placed all your data in a new column and added a forecast column.  Place you forecast formula in that column.  I made a summary table which aggregates the data the way you were viewing it before:
To confirm the formula is correct I placed a pattern in the Forecast column.  All you have to do is build the summary table as follows then update the forecast column with you formula.
In the Summary table:
B2=OFFSET(Table 12 :: $C$2, (COLUMN()-2) + 12*(ROW()-2), 0)
select B2 and fill to the right 12 columns.
select B2 thru M2 and fill down as many years as you need

Similar Messages

  • How to merge two date ranges

    Hi,
    I have following table. I want to merge date ranges if the dates are continuous and the value is same.I am using Oracle 10g.Please help.
    START_DATE END_DATE VALUE
    1/1/2008 12/31/2008 1234
    1/1/2009 12/31/2009 1234
    Sql statement output should be as follows:
    START_DATE END_DATE VALUE
    1/1/2008 12/31/2009 1234
    Thanks in advance.
    Edited by: user3898545 on Jan 27, 2010 7:44 PM

    Hi,
    user3898545 wrote:
    create table test_group(emp_id varchar2(5),
    start_date date,
    end_date date,
    value varchar2(10));
    insert into test_group(emp_id,start_date,end_date,VALUE) values ('E1','1-JAN-2008','31-DEC-2008','G1');start_date and end_date are DATEs; don't try to put VARCHAR2 values (such as '1-JAN-2008') into DATE columns. Use TO_DATE or DATE literals instead. The INSERT statements you posted may work on your system, but they won't necessarily work anywhere else. In particular, they don't work on my system. Post some sample data that anyone can use.
    ... I used following query to get the output 1/1/2009 - 12/31/2009 G2 when I ran for any date in 2010 or greater.There can be break in date ranges. Although query is giving the correct output which I am looking for I am looking for better performence.
    SELECT MAX (START_DATE)     AS START_DATE,MAX (END_DATE) AS END_DATE ,
    MAX(VALUE) KEEP (DENSE_RANK FIRST ORDER BY START_DATE DESC) GROUP_NUMBER
    FROM
    (WITH     GOT_GRP     AS
    (SELECT     TB_TEST_DATA.*,
         END_DATE - SUM (END_DATE + 1 - START_DATE) OVER ( PARTITION BY VALUE
                                            ORDER BY START_DATE) AS GRP
    FROM
    (SELECT HD.START_DATE,NVL(HD.END_DATE,'31-DEC-9999') "END_DATE",HD.VALUE
    FROM test_group HD
    WHERE HD.EMP_ID = 'E1'
    AND HD.START_DATE < NVL (HD.END_DATE, '31-DEC-9999')
    AND HD.END_DATE < :VDT_AS_OF_DATE
    ORDER BY EMP_ID,START_DATE) TB_TEST_DATA
    SELECT MIN (START_DATE)     AS START_DATE,MAX (END_DATE) AS END_DATE,VALUE
    FROM GOT_GRP
    GROUP BY VALUE,GRP
    ORDER BY START_DATE) CO_GRP;If you have new requirements, maybe you should start a new thread.
    What are your new requirements?
    When you say "There can be break in date ranges", do you mean grp plays no role in this new problem? In that case, you can save time and effort by not computing it.
    The following should produce the results you want from the sampe data given:
    WITH     got_r_num     AS
         SELECT     start_date, end_date, value
         ,     ROW_NUMBER () OVER ( ORDER BY start_date  DESC
                            ,           value       DESC
                           )     AS r_num
         FROM     test_group
         WHERE     end_date < TO_DATE ( :vdt_as_of_date
                           , 'DD-MON-YYYY'
    SELECT     start_date, end_date, value
    FROM     got_r_num
    WHERE     r_num     = 1
    ;

  • Please help me to merge two places.sqlite to get my old and New history at the same time, every time i rename my two places.sqlite to see my old and new history

    every time i rename my new places.sqlite to see my old history and come back rename old places.sqlite to see my new history, i tired and i found No Way to merge two places.sqlite :( but it's must be found this way for The PPL to see their old and new history :(
    Thank You all in Advance

    You can't merge history otherwise then using Sync to store the history and bookmarks of one places.sqlite on the Sync server and then disconnect.<br />
    Copy the second places.sqlite file to your Firefox profile folder with Firefox closed.
    Then setup Sync once again using that account and merge the content on the Sync server with your computer.
    * Merge this device's data with my Sync data

  • TS3988 how do i merge two icloud accounts - on on my computer and ipad, a different icloud id on my iphone?

    How do I merge two iCloud accounts into one?  One account is on my mac and ipad, the other on my iphone.

    Welcome to the Apple community.
    You cannot merge accounts, you will need to choose one and use it.

  • How do I merge two valid, purchased iTunes accounts into one so all my music is in same account?

    I have two valid, purchasd iTunes accounts.  Older iPod has some great music, I just got a new iPad and set up second iTunes account, bought some more iTunes items for that account.  Just discovered iCloud.  Now I want to put all my music from both accounts onto the cloud so I can access it on all my apple devices.   Can't seem to add from one account to the other.  Can sign onto the new account wiht my old iPod, but it will not let me sync without erasing all the music on the device.  How can I merge these two accounts into one?
    PS  Makes you wonder how helpful support is when the usernames "Frustrated," "really frustrated," and "Help!!!!" are all taken...lol

    HeyStupid wrote:
    how do I merge two valid, purchased iTunes accounts into one so all my music is in same account?
    You cannot. iTunes pruchases remian tied to the account they were purchased with.
    I just got a new iPad and set up second iTunes account,
    Why?
    Remove your info from new account, update old account as needed and use that.

  • How can I merge two iPhoto libraries stored on an external drive?

    Today I was in a One-to-One at the Apple Store.  I want to merge two i-Photo libraries into one.  One library is on my Air, the other is on my iMac.  Both libraries have been moved to an external drive.  When I try to move one onto the other, they won't go.  Yet I am certain that while at the store today, the person there started to merge them.  He did not need the library manager software in order to do so.  We stopped the merge in order to move on to another issue.  Now that I am home, I can't get the libraries to merge.  What am I failing to do?  Thanks!

    The only way to merge two libraryies is to use  iPhoto Library Manager which will merge two libraries and keep keywords, titles, faces, places, and other metadata intact.
    If one imports one library into another library every image file in the first library, originals, thumbnails, face files, etc,  get imported as an original photo. You will end up with a total mess.  DO NOT IMPORT ONE LIBRARY INTO ANOTHER LIBRARY!
    If you have backup copies of your libraries get them back and use iPhoto Library Manager to merge them.
    OT

  • Can you merge two user accounts on macbook? my wife has created a user on her new macbook , then inadvertently created a second one when using the migration tool. 1st ac has her office 365 install, yet 2nd has her itunes database, docs and contacts.

    Can you merge two user accounts on a macbook? my wife has created a new user on her new macbook air then, inadvertently, created a second one when using the migration tool. 1st a/c has her office 365 install, while 2nd has her itunes database, docs and contacts. What is the best way forward to get everything into the one account? Not sure if the office 365 will allow another installation into the second account, otherwise would just do that and delete the first, if that is possible?

    There is no merge but you can move data from one account to another via the Shared folder. Data is copied from Shared. Watch your free space when copying. These are large files.  Do one at a time if you are on a small drive. After making copy, delete from other users before you start next copy.
    Office365 installs in the main Applications folder and is available for all users on the computer. Activation is tied to the drive not the User.

  • How do I merge two different libraries, linked to one account? They're on two different computers but I want them to be on one

    How do I merge two different libraries, linked to one account? They're on two different computers but I want them to be on one

    This should do the trick
    Home Sharing Learn More
    http://support.apple.com/kb/HT201976
    Best of Luck

  • HT204053 Can you merge two Apple IDs into one?  It was a common issue caused by the iPhone 4 and has been corrected, but transferring purchases in iTunes is a pain with two IDs.

    For a brief time when iPhone 4, iOS 4 came out, many of us ended up with two Apple IDs.  I want to know if anyone can please provide me with simple step-by-step instructions on merging two Apple IDs into one?  It would make transferring purchases on iTunes much easier and reliable.  I realize i desperately need an iOS update, but i had no laptop for over two years!  I'm posting a cry for help on that in another community.  Thank you all.

    No,
    Apple IDs cannot be merged. You should use your preferred Apple ID from now on, but you can still access your purchased items such as music, movies, or software using your other Apple IDs.

  • Can i merge two apple ids into one

    i have two apple IDs that i need to merge.  money is both accouts, paid apps on both accounts.
    What are my options?
    thanks

    http://appletoolbox.com/2012/10/can-i-merge-two-or-more-apple-ids-using-multiple -apple-ids/
     Cheers, Tom

  • Can you merge two apple ids

    I have two Apple id's. Not sure why. but one is for my iPod that was set up a long time ago and what I use for iTunes. The is for my iPhone. I want to use the itunes cloud storage so i can listen to my music on my iPhone but i'm guessing that won't work if you have two id's. Of couse they'd need to match. Can you merge two id's? I would like to simplify anyway and just have one.
    Thanks.

    No.
    (106976)

  • Can i merge two Apple ID's?

    can i merge two Apple ID's?
    I have one with me.com and one neutral one.
    would love to have just the me.com Apple ID.
    How do I merge??

    You can't merge accounts, nor transfer content from one account to another account - content will remain tied to the account that bought/downloaded it.

  • How to merge two Apple IDs into one?

    Is it possible to merge two IDs into one?  I don't want to use the 'hotmail.com' extension anymore.

    No. All purchases remain tied to the AppleID used to obtain them and cannot be transferred.
    tt2

  • Merging two records in a single record for the same matnr,werks and bwart.

    Hi I have a requirement to merge two records into one single record using the quantity field from MSEG table.
    I am selecting two records from the table MSEG. Now for these two records i have to add the quantity values into one variable.
    Then there should be only one record for the same matnr,werks,bwart.
    Any suggestion would be appreciated.
    Regards,
    Amit

    hi,
    You can COLLECT statement only if all non key fields are numeric.
    This statement Adds all such fields and give us a single record.
    Regards
    Sumit Agarwal

  • Merge Two Rows of a table to One row but into two columns

    Hi
    I Am struck in writing a query to merge two rows into two columns of one row.
    Here is the Sample data i am working with,
    Col 1     Col 2     Col3 Col4 Col Col6
    5000     573-3000 2     0     Phone      
    5000     573-3036 1     0          Fax
    5000     893-5703 3     0     WOrk      
    3000     232-5656     1     0     Phone     
    3000     353-5656     2     0          FAx
    Here Col,Col3,Col4 form the Key.
    now wht i am trying to do is to Merge these type of rows put them into Columns P,F,W,E respectively to achive a Structure as below
    Col1      P     F     W
    5000     573-3000      573-3036      893-5703
    3000     232-5656     353-5656     
    Can you please help me how could i do this.
    I am pretty ordinary at writing SQL's.
    Thanks a Lot in Advance
    Message was edited by:
    Sreebhushan

    Search the forum for PIVOT and you'll find plenty of examples.

Maybe you are looking for

  • Crystal Reports Viewer Toolbar Images missing

    I have Crystal Reports XI R2 installed on a windows server 2008 R2 Enterprise server and when a when I browse to my asp.net page withe the crystal reports viewer I get the red x's for the toolbar images.  The viewer and web.config entries all referen

  • How can I set a graphic to link to a specific detail region?

    I have a master/detail region set. Works fine. I'd like to place a graphic below the menu(master region) that would link to a certain detail region. I'm using HTML data set. Any thoughts?

  • White lines in Firefox on new 27 iMac with 10.6.2

    I get white lines on images being displayed in firefox. These are high resolution images from searching google images. I did not have any trouble on my 20 inch imac with 10.5. I can use Command + Shft + 4 to take a snapshot and the white lines are re

  • NotSerializableException

    I have a class that imports : import com.sun.xml.tree.ElementNode.*; in this class i use createElement function, getElementsByTagName it gives an exception as : java.io.NotSerializableException: com.sun.xml.tree.ElementNode The console output is: jav

  • ArrayOutOfBound exception thrown in JAI API

    Hi I am getting exception ArrayOutOfBound exception for one of my image sample that i tried. The code snippet is src is a BufferedImage. IndexColorModel icm = (IndexColorModel)src.getColorModel(); int numBands = 3; if(icm.hasAlpha()) numBands = 4; by