+ Reply to Thread
Results 1 to 15 of 15

Max. & Min. values from the set of alternate positive and negative numbers.

  1. #1
    Forum Contributor
    Join Date
    02-25-2012
    Location
    Coimbatore, India
    MS-Off Ver
    Excel 2010
    Posts
    445

    Max. & Min. values from the set of alternate positive and negative numbers.

    Hello Friends

    Please refer the attached 2010 Excel file : <Angle in Excel.xlsx>.

    I want to calculate the maximum and minium numbers (For 2 columns) from
    the set of alternate positive and negative numbers.

    The values are to be plotted in yellow cells.

    thanks in advance

    thilag
    Attached Files Attached Files

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Max. & Min. values from the set of alternate positive and negative numbers.

    Hi,

    You don't say how zeroes in column C should be considered in terms of this exercise, but this array formula** in G2 should give you what you want until you decide on the answer to that question:

    =INDEX(A$2:A$67,SMALL(IF((SIGN($C$2:$C$67)<>SIGN($C$3:$C$68))+(SIGN($C$2:$C$67)<>SIGN($C$1:$C$66)),ROW($A$2:$A$67)-MIN(ROW($A$2:$A$67))+1),ROWS($1:1)))

    Copy across and to the right as required.

    Regards


    **Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Forum Contributor
    Join Date
    02-25-2012
    Location
    Coimbatore, India
    MS-Off Ver
    Excel 2010
    Posts
    445

    Re: Max. & Min. values from the set of alternate positive and negative numbers.

    Hello XOR LX

    thanks for your feedback.

    1) In case of any zeros then we can make it as positve side.
    2) Query : Can we make the formula if the continous postive or negative values are exceeding the given number (Here say in Cell I1, value is 5) then the Maximum and Minimum values should be printed otherwise it should switch for the next postive / negative value (i.e., if a continous postive count is 4 then it should omit the plotting for positive value (for that set contains 4 positive values) then it should switch for next negative values (if is contain more than 5 values ok, then it should plot the max. & min values for negative set otherwise again it should check for the next positive set like that).

    thanks again

    thilag

  4. #4
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Max. & Min. values from the set of alternate positive and negative numbers.

    Perhaps, but just to be clear could I ask you to re-post your attachment with the updated, manually-calculated figures based on this new condition added?

    Regards

  5. #5
    Forum Contributor
    Join Date
    02-25-2012
    Location
    Coimbatore, India
    MS-Off Ver
    Excel 2010
    Posts
    445

    Re: Max. & Min. values from the set of alternate positive and negative numbers.

    Hello XOR LX

    if you uploaded the new file means very helpful for me, Otherwise i will populate a new updated file with the help of your formulas.

    thanks

    thilag

  6. #6
    Forum Contributor
    Join Date
    02-25-2012
    Location
    Coimbatore, India
    MS-Off Ver
    Excel 2010
    Posts
    445

    Re: Max. & Min. values from the set of alternate positive and negative numbers.

    Sorry

    I misunderstood, now i uploaded the new attachment with new conditions.

    thanks

    thilag
    Attached Files Attached Files

  7. #7
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Max. & Min. values from the set of alternate positive and negative numbers.

    Not sure I understand - there's no value in I1? Is this not to be a variable?

    Regards

  8. #8
    Forum Contributor
    Join Date
    02-25-2012
    Location
    Coimbatore, India
    MS-Off Ver
    Excel 2010
    Posts
    445

    Re: Max. & Min. values from the set of alternate positive and negative numbers.

    Hello XOR LX

    Sorry, i totally missed 1 major point regarding zero. You earlier notified to me but i missed it.

    Now i attached the new excel file <Angle in Excel3.xlsx>.

    I listed cleraly the Cell value I1 = 5 and the new conditions about zero.

    New Conditions :
    1) if the total positive or negative value count is greater than given value in cell I1 (Here 5 is plotted) then the values are to be plotted in yellow cells.
    2) if the total positive or negative value count is less than or equal to given value in cell I1 (Here 5 is plotted) then the values are to be omitted / skipped in yellow cells.
    Example : In Rows 18 to 22 cells A18 to C22 the total negative set count is 5 (Including zero), which not mets the condition so omited.
    3) If Zeros `0' Available then it should be taken as Negative value if it is available in the Negative set of light yellow cells
    4) If Zeros `0' Available then it should be taken as Positive value if it is available in the Positive set of light green cells
    5) If Zeros `0' occurs in between inbetween Negative and Positive Set then take it as Positive Set.
    6) If Zeros `0' occurs in between inbetween Positive and Negative Set then take it as Negative Set.
    7) Note : If the Zero `0' in between Negative and Positive Set (Point 5) & Positive and Negative Set (Point 6)
    then you can the zero as Positive or Negative value (Vice versa for Point 5 & 6) Since it is not a big deal.
    But the Points 1) to 4) are obvious requirements.



    thanks

    thilag
    Attached Files Attached Files

  9. #9
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Max. & Min. values from the set of alternate positive and negative numbers.

    Hi,

    Not sure I understand:

    Quote Originally Posted by thilag View Post
    3) If Zeros `0' Available then it should be taken as Negative value if it is available in the Negative set of light yellow cells
    But in your attached rows 5, 8, 11, 12, etc. contain zeroes and are in the set of light yellow cells, yet you have added the comment "Here zero is taken as positive value" for each of these rows (apart from row 8, for which I don't understand why there is no comment).

    Regards

  10. #10
    Forum Contributor
    Join Date
    02-25-2012
    Location
    Coimbatore, India
    MS-Off Ver
    Excel 2010
    Posts
    445

    Re: Max. & Min. values from the set of alternate positive and negative numbers.

    Hello

    Sorry I missed while typing, for 8 also `Here zero is taken as positive value' comment applicable.

    thanks

    thilag

  11. #11
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Max. & Min. values from the set of alternate positive and negative numbers.

    But why positive? Look at your rule (3 again.

    Regards

  12. #12
    Forum Contributor
    Join Date
    02-25-2012
    Location
    Coimbatore, India
    MS-Off Ver
    Excel 2010
    Posts
    445

    Re: Max. & Min. values from the set of alternate positive and negative numbers.

    The Reason is Light Yellow set values A2:C17 contains positive values in Column C i.e, C2:C17.

    Rule 3 "3) If Zeros `0' Available then it should be taken as Negative value if it is available in the Negative set of light yellow cells"
    Rule 4 "4) If Zeros `0' Available then it should be taken as Positive value if it is available in the Positive set of light green cells"

    As per the note 3) & 4) it should be positive only.

    thanks

    thilag

  13. #13
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Max. & Min. values from the set of alternate positive and negative numbers.

    Quote Originally Posted by thilag View Post
    Rule 3 "3) If Zeros `0' Available then it should be taken as Negative value if it is available in the Negative set of light yellow cells"
    But cells C2:C17 are light yellow: hence, according to the above, should be taken as Negative value.

    Regards

  14. #14
    Forum Contributor
    Join Date
    02-25-2012
    Location
    Coimbatore, India
    MS-Off Ver
    Excel 2010
    Posts
    445

    Re: Max. & Min. values from the set of alternate positive and negative numbers.

    Sorry

    I changed the condition 3) & 4) color and uploaded the new file.

    now you can go ahead.

    thanks

    thilag
    Attached Files Attached Files

  15. #15
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Max. & Min. values from the set of alternate positive and negative numbers.

    Apologies. I am unable to solve your problem given these new conditions.

    Regards

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] SUMIF positive and negative numbers - take double a negative number?
    By Zordrail in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-16-2014, 08:34 AM
  2. Convert negative to positive in sheet containing both positive/negative numbers
    By sa02000 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-29-2010, 07:52 PM
  3. adding positive and negative numbers all as positive
    By tomvh444 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-18-2009, 04:08 PM
  4. Replies: 1
    Last Post: 11-20-2008, 01:52 AM
  5. Replies: 4
    Last Post: 09-26-2005, 06:05 PM

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