Results 1 to 6 of 6

Thread: Calculation with different condition in a cell

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Senior Member LalitPandey87's Avatar
    Join Date
    Sep 2011
    Posts
    222
    Rep Power
    13

    Calculation with different condition in a cell

    Hi All,

    I have some data ex:


    Category Sub Category Values
    asd 2
    asd 4
    edf 2
    asd 3
    aec a 2
    edf a 1
    aef a 2
    qwe a 1
    aef a 4


    i need some formula or VBA which can do the calculation according to below condition:

    1:- If Category contains value but sub cat. doesn't and there is only single entry for this then the output will be the value of the entry
    2:- If Category contains value but sub cat. doesn't and there is more then one entry for this then the output will be the average of the values
    3:- If Category and sub cat. both contains value and there is only single entry for this then the output will be the value of the entry
    4:- If Category and sub cat. both contains value and there is more then one entry for this then the output will be the average of the values
    5:- If Category and sub cat. both contain values and category are same but sub cat. are differ then the output will be the value of the entry

    and Output will be like this:

    Category Sub Category Values OutPut
    asd 2 3
    asd 4 3
    edf 2 2
    asd 3 3
    aec a 2 2
    edf a 1 1
    aef a 2 3
    qwe a 1 1
    aef a 4 3


    Thanks in Advance.
    Last edited by LalitPandey87; 04-03-2012 at 06:51 PM.

Similar Threads

  1. Deduct Highests Scores By Condition
    By antonio in forum Excel Help
    Replies: 3
    Last Post: 06-08-2013, 06:20 PM
  2. Formula Following Order Of Calculation BODMAS
    By paul_pearson in forum Excel Help
    Replies: 7
    Last Post: 03-27-2013, 02:07 PM
  3. Hours Calculation between two times
    By excel_learner in forum Excel Help
    Replies: 3
    Last Post: 11-21-2012, 05:04 PM
  4. Formula Based On Condition
    By Aryan063007 in forum Excel Help
    Replies: 4
    Last Post: 10-09-2012, 10:37 AM
  5. Excel Nested IF 3 Condition Formula
    By yomgi in forum Excel Help
    Replies: 2
    Last Post: 02-20-2012, 11:50 PM

Tags for this Thread

Posting Permissions

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