+ Reply to Thread
Results 1 to 20 of 20

Excel 2007 : Date comparison and data transfer

  1. #1
    Registered User
    Join Date
    05-21-2012
    Location
    Los Angeles
    MS-Off Ver
    Excel 2007
    Posts
    75

    Date comparison and data transfer

    Hello Seniors,
    I am in a novice in excel and have a problem in hand and I am in a real fix. I have 3 sheets in one workbook.
    In sheet "summary" I will enter the date manually everyday under the Actual column e.g. 05/24/2012. Now, I want to copy data from "Actual" sheet under the same date 05/24/2012 that I have entered under the "Actual" column in "Summary" sheet. So according to my excel sheet value of Org 1,5,7,8 under date 5/24/2012 should be copied from Actual to Summary.

    Similarly, I have to copy the data of the same Org 1,5,7,8 from the forecast worksheet for the next 7 days. I will again enter these 7 dates manually. So, whatever date is there under the 7 forecast column, I need to copy the corresponding values from "Forecast" sheet, Similar flow to the above "Actual to Summary".

    So I again have compare each of 7 dates under forecast and copy corresponding data.

    I need urgent help, please help me it will be really helpful and will save a lot of time.

    Amandeep
    Attached Files Attached Files
    Last edited by amandeepsharma89; 06-27-2012 at 01:58 PM.

  2. #2
    Registered User
    Join Date
    06-25-2012
    Location
    Chennai
    MS-Off Ver
    Excel 2007
    Posts
    22

    Lightbulb Re: Date comparison and data transfer

    Here is the attached for your purpose
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    05-21-2012
    Location
    Los Angeles
    MS-Off Ver
    Excel 2007
    Posts
    75

    Re: Date comparison and data transfer

    Hey thank you for the reply, if I change the date in the Summary worksheet the data below it is not changing. I will manually change the dates everyday. All other values should be filled on its own. And this will be a year long process. Also, can you please explain me the formula

    Amandeep

  4. #4
    Forum Contributor
    Join Date
    03-15-2007
    Location
    AL, USA
    MS-Off Ver
    2007
    Posts
    174

    Re: Date comparison and data transfer

    eh, I think it might be better with an hlookup anyway:

    Put this formula in the summary tab in cell E5, then you can fill it down:
    =HLOOKUP(E$4,Actual!$B:$XFD,RIGHT($D5,1)+1,FALSE)

    And then put the following in cell F5:
    =HLOOKUP(F$4,Forecast!$B:$XFD,RIGHT($D5,1)+1,FALSE)
    Then fill that down and over.

    It won't let me upload the file for some reason... Gives me Error 2038
    Last edited by mshale; 06-27-2012 at 03:23 PM. Reason: Added website's error number

  5. #5
    Registered User
    Join Date
    06-25-2012
    Location
    Chennai
    MS-Off Ver
    Excel 2007
    Posts
    22

    Lightbulb Re: Date comparison and data transfer

    Hi Aman, Actually we need to matching by asssigning numbers to each date and after that made vlookup. The thing is we need to take each org and date in our vlookup formula, so that if you change date the data also automatically changing.
    Formula is==IF(ISNA(VLOOKUP($D5,Actual!$A:$N,VLOOKUP($E$4,$N$2:$O$19,2,FALSE), FALSE))=TRUE,0,VLOOKUP($D5,Actual!$A:$N,VLOOKUP($E$4,$N$2:$O$19,2,FALSE), FALSE))

    I attached excel with vlookup formula for better understanding.
    Attached Files Attached Files
    Last edited by Banuchander; 06-27-2012 at 03:19 PM. Reason: spelling correction

  6. #6
    Registered User
    Join Date
    05-21-2012
    Location
    Los Angeles
    MS-Off Ver
    Excel 2007
    Posts
    75

    Re: Date comparison and data transfer

    Hi mshale,
    It worked perfectly. However, I will have max 120 days (for each quarter) in actual and forecast worksheet where dates start from B1 and the Org name starts from A5 to A150. What will be the code for it.
    I may have few more questions.
    Waiting for your reply

    Amandeep

  7. #7
    Registered User
    Join Date
    05-21-2012
    Location
    Los Angeles
    MS-Off Ver
    Excel 2007
    Posts
    75

    Re: Date comparison and data transfer

    Hi Banuchander,
    I will try that code. But don't you think I will have to hardcode it every time I change the date?

  8. #8
    Registered User
    Join Date
    05-21-2012
    Location
    Los Angeles
    MS-Off Ver
    Excel 2007
    Posts
    75

    Re: Date comparison and data transfer

    mshale,
    Can you also explain me the what your formula is doing so that I can modify if need arises.
    Thanks for the awesome work

    Amandeep

  9. #9
    Registered User
    Join Date
    06-25-2012
    Location
    Chennai
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Date comparison and data transfer

    yes you are right. I was trying to help you. But mshale done excellent work

  10. #10
    Registered User
    Join Date
    05-21-2012
    Location
    Los Angeles
    MS-Off Ver
    Excel 2007
    Posts
    75

    Re: Date comparison and data transfer

    Banuchander I really appreciate your help, I was not even able to do that.

  11. #11
    Registered User
    Join Date
    05-21-2012
    Location
    Los Angeles
    MS-Off Ver
    Excel 2007
    Posts
    75

    Re: Date comparison and data transfer

    What do
    Actual!$B:$XFD,RIGHT($D5,1)+1 parameters mean?
    In =HLOOKUP(E$4,Actual!$B:$XFD,RIGHT($D5,1)+1,FALSE)
    Can someone explain it!

    Amandeep

  12. #12
    Registered User
    Join Date
    05-21-2012
    Location
    Los Angeles
    MS-Off Ver
    Excel 2007
    Posts
    75

    Re: Date comparison and data transfer

    When I tried it in my original sheet it is giving me #VALUE! error. Can anyone please let me know the solution?

    Amandeep

  13. #13
    Forum Contributor
    Join Date
    03-15-2007
    Location
    AL, USA
    MS-Off Ver
    2007
    Posts
    174

    Re: Date comparison and data transfer

    Quote Originally Posted by amandeepsharma89 View Post
    Hi mshale,
    It worked perfectly. However, I will have max 120 days (for each quarter) in actual and forecast worksheet where dates start from B1 and the Org name starts from A5 to A150. What will be the code for it.
    I may have few more questions.
    Waiting for your reply

    Amandeep
    I made the formulas so that all you would have to do is fill them down and over for however many orgs and days you have. There should be no change to the formula.
    Quote Originally Posted by amandeepsharma89 View Post
    mshale,
    Can you also explain me the what your formula is doing so that I can modify if need arises.
    Thanks for the awesome work

    Amandeep
    All it is doing is looking up the date you type in, in your actual/forcast sheets, and reporting a value based on the org number. Very similar to an index formula which is what banuchander was going for.
    Quote Originally Posted by amandeepsharma89 View Post
    When I tried it in my original sheet it is giving me #VALUE! error. Can anyone please let me know the solution?

    Amandeep
    I'm not sure what your original sheet contains. If it is different from the one you posted, you will need to change the refernces.

  14. #14
    Forum Contributor
    Join Date
    03-15-2007
    Location
    AL, USA
    MS-Off Ver
    2007
    Posts
    174

    Re: Date comparison and data transfer

    Quote Originally Posted by amandeepsharma89 View Post
    What do
    Actual!$B:$XFD,RIGHT($D5,1)+1 parameters mean?
    In =HLOOKUP(E$4,Actual!$B:$XFD,RIGHT($D5,1)+1,FALSE)
    Can someone explain it!

    Amandeep
    This is taking the number of the org (right($D5,1)) and adding one to it to create a row number to look up in the entire sheet Actual (Actual!$B:$XFD), just in case you wanted to keep track of this over years to come

  15. #15
    Registered User
    Join Date
    05-21-2012
    Location
    Los Angeles
    MS-Off Ver
    Excel 2007
    Posts
    75

    Re: Date comparison and data transfer

    Hi mshale,
    My original sheet have a different name (org) like Lending, Balance, Deposits etc and they are arranged in alternate rows. How should I solve it? Please help me out really close to solve it.

    And my actual org are in column A and are spread across different row number

    Amandeep
    Last edited by amandeepsharma89; 06-27-2012 at 04:56 PM. Reason: some more explaination

  16. #16
    Registered User
    Join Date
    05-21-2012
    Location
    Los Angeles
    MS-Off Ver
    Excel 2007
    Posts
    75

    Re: Date comparison and data transfer

    I figured out the solution and solved it. Now I have one query. I am using the formula

    =HLOOKUP(E$4,Actual!$B:$XFD,6,FALSE)----this works fine

    For one row I need the following hlookup

    =HLOOKUP(E$4-1,Actual!$B:$XFD,6,FALSE)--where I need the previous date.

    However if it is monday it take the previous day value, therefore it gives me an error as there is no Sat and Sun date and date in my actual and forecast worksheet. So, if it is monday I need fridays data. How to solve this. This is the only problem that I have right now, please let me know how to solve it.

    Amandeep

  17. #17
    Forum Contributor
    Join Date
    03-15-2007
    Location
    AL, USA
    MS-Off Ver
    2007
    Posts
    174

    Re: Date comparison and data transfer

    Well, If you insert a column before the "actual" clolumn in the Summary tab and type the date on the same row as everything else, then you can take the "$" in front of the "E" out of the formula you mentioned, and fill it over, and then down to get your orgs.

    I'm leaving for the day, so I hope that was enough info to help you out!

  18. #18
    Forum Contributor
    Join Date
    06-27-2012
    Location
    NY
    MS-Off Ver
    Excel 2003
    Posts
    164

    Re: Date comparison and data transfer

    you can use this formula = IF(WEEKDAY(A1)=6,A1+3,A1+1) I believe it will exclude weekends. However you must manually type in the first date on cell A1 = 5/24/12
    and then on cell A2 use the formula above. I hope this helps!

  19. #19
    Registered User
    Join Date
    05-21-2012
    Location
    Los Angeles
    MS-Off Ver
    Excel 2007
    Posts
    75

    Re: Date comparison and data transfer

    Hey mshale,
    Thanks a lot for your help really appreciate it!! Perfect solution for the given problem. You rock! Have a nice day.

    Amandeep

  20. #20
    Forum Contributor
    Join Date
    03-15-2007
    Location
    AL, USA
    MS-Off Ver
    2007
    Posts
    174

    Re: Date comparison and data transfer

    Quote Originally Posted by amandeepsharma89 View Post
    Hey mshale,
    Thanks a lot for your help really appreciate it!! Perfect solution for the given problem. You rock! Have a nice day.

    Amandeep
    Glad I could help! Don't forget to mark this thread as solved

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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