Consulting

Results 1 to 3 of 3

Thread: differenec between two cells - tricky one

  1. #1
    VBAX Tutor
    Joined
    Aug 2007
    Posts
    294
    Location

    differenec between two cells - tricky one

    See attached workbook
    Hi Experts

    How would i insert into a difference description bewteen worksheet(s) "Milestone Detail & Matrix - Pre" and "Milestone Detail & Matrix - Cur" in the attached workbook. Range B13:BE56 both worksheets

    So say if we had a difference of dates bewteen as follows:

    worksheet "Milestone Detail & Matrix - Pre" cell B13 date = 25 September 08
    and
    worksheet "Milestone Detail & Matrix - Cur" cell B13 date = 29 September 08

    So in worksheet "Difference" the basic if forumla will say difference and highlight cell B13 as Red in font black text to make the user aware of the difference.

    But i would also like the difference of 25/09/08 - 29/09/08 i.e. +4 days movement in date to be shown in cell b13 worksheet "Difference Description"...

    I hope this make some sense

  2. #2
    Knowledge Base Approver VBAX Guru GTO's Avatar
    Joined
    Sep 2008
    Posts
    3,368
    Location
    Greetings Pete,

    Case you're still looking for this, there was no attachment.

    Mark

  3. #3
    Moderator VBAX Master georgiboy's Avatar
    Joined
    Mar 2008
    Location
    Kent, England
    Posts
    1,198
    Location
    You could try the days 360 function

    =DAYS360(Milestone Detail & Matrix - Pre!B13,Milestone Detail & Matrix - Cur!B13)

    Place this in your difference sheet

    This function can be slightly inacurate due to the fact it assumes thereare 30 days in each month

    or

    just take one date away from the other

    =Milestone Detail & Matrix - Cur!B13-Milestone Detail & Matrix - Pre!B13

    so

    lets just say the dates are on the same sheet to make it easier to read and you wanted the difference returned within a string within an if statement, it would be

    =IF(B1>A1,"There is an increase of "&B1-A1&" days","Same")

    B1 being the largest date

    Hope this helps
    Last edited by georgiboy; 10-24-2008 at 10:53 PM.
    Click here for a guide on how to add code tags
    Click here for a guide on how to mark a thread as solved
    Click here for a guide on how to upload a file with your post

    Excel 365, Version 2403, Build 17425.20146

Posting Permissions

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