Closed Thread
Results 1 to 3 of 3

Complex formula using IF THEN ELSE

  1. #1
    Registered User
    Join Date
    06-16-2011
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    40

    Complex formula using IF THEN ELSE

    Hello,
    I've created an excel worksheet. In the column F, I've a user form which will help me to select one or more entry and display in a cell in column F.


    In column I am using the formula "=((H2/20))" for calculating individual effort.
    Now, in column J, I need to display the remaining effort.
    For this I'm using the formula, "=(20-(COUNTIF($A$2:A2,A2)=COUNT($A$2:A2))*SUM($H1:H$2)-H2)/20"
    in J3 & "=((20-H2)/20)" in J2, which needs to be modified a bit.

    Now, lets say I've selected abc, xyz in F3:

    Then in I3 results should be displayed as - "abc: 25%, xyz: 25%"

    In J3, the results should be displayed as - "abc:75%, xyz :75%".

    Now, again if I select abc, lmn in F4:

    Then in I4 results should be displayed as "abc:25%, lmn:25%"

    In J4, the results should be displayed as "abc: 50%, lmn :75%".

    Please note, since in J3: the remaining effort for abc was 75% and in I4 the effort required was 25%. Hence the calculated result in J4 (I4-J3).

    The logic for the formula has to be :

    For J3:
    IF(A3=A2) && the occurrence of an entry in F3 is for the first time THEN (J3=(20-(G2+G3))/20)
    ELSE J3=Jn - I3.

    Here, Jn denotes the last occurence of the an entry displayed F3.

    For J4:

    IF(A4=A3 & A3=A2) && the occurrence of an entry in F4 is for the first time THEN (I4=(20-(G2+G3+G4))/20)
    ELSE J4=Jn - I4.

    Similarly,
    For J5:

    IF(A5=A4 & A4=A3& A3=A2) && the occurrence of an entry in F5 is for the first time THEN (I5= (20-(G2+G3+G4))/20)
    ELSE J5=Jn - I5.

    and so on...


    I've attached the excel for your reference.
    Attached Files Attached Files

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Complex formula using IF THEN ELSE

    This is a duplicate post and as such does not comply with Rule 5 of our forum rules. This thread will now be closed, you may continue in your other thread.

    Thread Closed.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Complex formula using IF THEN ELSE

    This is a duplicate post and as such does not comply with Rule 5 of our forum rules. This thread will now be closed, you may continue in your other thread.

    Thread Closed.

Closed 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