+ Reply to Thread
Results 1 to 2 of 2

Random Data Set Needing Weird Values

  1. #1
    Registered User
    Join Date
    08-01-2016
    Location
    OH
    MS-Off Ver
    2016
    Posts
    15

    Random Data Set Needing Weird Values

    Attached you will find a sample set of data from a spreadsheet that contains 26,000 values that I don't want to calculate by hand. I have include all the possible scenarios between week 1 and week2. I have also included what the answer should be in column C. The below information is what I need a formula written for to determine the answer. Any help would be greatly appreciated.

    If both numbers are positive, then the answer is 0
    If both numbers are negative, then the answer is 0
    If both numbers are zero, then the answer is 0
    If one positive and one negative, then sum two numbers
    If positive sum take negative column value
    If negative sum take positive column value
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Random Data Set Needing Weird Values

    Based on your criteria noted above, the formula would be:

    =IF(SIGN(A2)=SIGN(B2), 0, IF(SIGN(SUM(A2:B2))=1, MIN(A2:B2), MAX(A2:B2)))

    Note, your example answer in C5 appears to be incorrect.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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. Replies: 4
    Last Post: 02-25-2017, 02:18 AM
  2. New and needing a lil help - dynamic monthly values
    By anonitachi in forum Hello..Introduce yourself
    Replies: 4
    Last Post: 02-10-2015, 06:00 AM
  3. [SOLVED] Needing to count unique values across multiple sheets
    By TheTubaGeek in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 06-10-2014, 09:50 AM
  4. Replies: 9
    Last Post: 05-07-2014, 11:37 PM
  5. Replies: 0
    Last Post: 02-17-2014, 06:34 AM
  6. Autofill non-random or consecutive data (constant and multiple values data)
    By etgriffiths in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-22-2013, 09:16 PM
  7. Replies: 3
    Last Post: 09-30-2012, 03:03 PM

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