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
    Last edited by daymaker; 07-04-2011 at 11:46 PM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Need help with this super complex Formula using IF THEN ELSE!

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    PLEASE PM WHEN YOU HAVE DONE THIS AND I WILL DELETE THIS POST
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    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)

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