Summing All Negatives Before Hitting A Positive

Aug 23, 2007

Let us say that this is a certain cash flow

Year - Cash flow
2007 - (200)
2008 - (100)
2009 - 50
2010 - 100
2011 - 200
2012 - (100)
2013 - (25)
2014 - 50
2015 - 300

For year 2007,2008,2012 and 2013, we have negative cash.

I want to compute for the investment cost, which I define to be the total accumulated cost before first positive cash. First positive cash occurs at 2009, so I want to sum 2007 and 2008, However, 2012 and 2013 also reports negative cash, so in the SUM formula, their values will be included.

How should I write the formula in order to sum all the negative cash before positive cash, disregarding all the other cash flows thereafter (be it positive or negative)?

View 9 Replies


ADVERTISEMENT

Display Positive Numbers As Negatives

Feb 29, 2008

I would like to be able to enter numbers into a cell as a positive number, but have them actually display as negative in that cell.

View 2 Replies View Related

Moving To Next Row With Out Hitting Return

Oct 16, 2009

Is there a way to move to the next row without hitting return when you reach the end of a specific cell so as not to over run the cell size?

View 4 Replies View Related

Hitting Nesting Limit

Nov 21, 2007

I'm building a model that based on the start date (cell C7) needs to display the month of the project (M1, M2, M3, M4, ... M12) under the appropriate calendar month (Dec-07, Jan-08, etc.). The formula below works great (E4 is the calendar month Dec-07 in this case, and when I drag the formula horizontally it updates (F4, G4, etc.). B33 through B44 are my month references M1, M2, M3, etc.)

Here's the problem: The below statement contains seven nested ifs and Excel won't let me add additional if statements. How else can this be accomplished?

=IF(AND(E4>=$C7,E4=$C7,E4=$C7,E4=$C7,E4=$C7,E4=$C7,E4

View 9 Replies View Related

Sheet Won't Calculate Without Hitting Enter

Aug 7, 2014

I found some VBA code here which I very slightly modified that I'm using to bring pictures over top of cells based on their values. The code works great but I can't get it to automatically update the pictures. To get the picture in each cell I have to hit F2+Enter. I've made sure that my calculations are on automatic.

I have tried the text-to-column trick as well as the find-replace = with = trick and neither of them worked. I'm guessing I need to call a function here to force each cell to recalculate in the same way F2+Enter works but I'm not how to do that or where to put it. I tried Application.Volatile True and that didn't work either.

[Code] .....

View 6 Replies View Related

Getting Negatives (-1) In Output

Jan 30, 2014

I am using one file, in that out put is coming but some times it is showing out put as -1.

Please find the attachment.

In the Sheet 1 Column X some out puts are coming as -1, what is the error in my formula.

Platform Open tickets on 29.01.2014.xlsx‎

View 1 Replies View Related

VBA Code - Exit Combobox By Hitting Tab And Enter

Aug 10, 2013

I have a problem here regarding the combo box. The whole Column A has combobox. It would be easier if by just hitting the TAB or Enter it would go to the next cell just like what is usual in excel.

TAB = next cell to the right
Enter = Next cell below

View 1 Replies View Related

Change The Date By Hitting Th Edit Button

Jan 31, 2007

I have this data from a sheet in date format in cell "A1". i retrieve the value of the date in a textbox. TextBox1.Value = Range("A1").Value then i wanted to change the date by hitting th edit button

private sub CommandButton1_Click()
DTPicker.Value = Range("A1").Value
End Sub

after changes have made, button save is clicked and at the same time the value from DTPicker is send to cell "A1", the value is retrieve back into TextBox1

private sub CommandButton2_Click()
Range("A1").Value = DTPicker.Value
TextBox1.Value = Range("A1").Value
End Sub

don't know what happen suddenly the value inside the cell become 12:00:00 AM, while the actual value that were supposed to be in that cell and textbox is 12/1/1999 - which is 12th of january 2001

View 5 Replies View Related

Replace All Negatives With 0 In Column

Apr 15, 2009

I have a column with both positive and negative numbers, is there a macro or a bit of code that will convert all negative numbers in a selected column to zeroes?

View 3 Replies View Related

Matching Negatives And Positives Once

Apr 30, 2009

I'm trying (with little success) to match some negatives and positives, but the formulas that I found on line keep on picking up all matches (just like a VLOOKUP formula)

23
23
-23

The formula would match the -23 with the 2 positive 23s. This formula goes in Column O

View 4 Replies View Related

Percentage Formula With Negatives

Jan 28, 2009

I have a question regarding calculating percentage differences, here is how our formula works, but I've done a little research regarding using negative number for percentage calculations and am not sure...

For sample:

this year (TY) we had net profit of $200 million
last year (LY) we had net loss of -$32 million

our formula works kinda like this:

=IF(B49="","-",IF(B49=0,0,D49/B49-1))

but if, the comparing numbers is negative should I convert that to an absolute number using ABS ? what if both numbers are negative ?

The way I understand the current formula is like this:

if B49 is blank, then insert a dash, otherwise IF B49 is 0, then 0 (since we can't divide by 0), otherwise do the formula.

View 9 Replies View Related

Disable Automatic Negatives

Jul 19, 2006

Long Version: This should be a fairly simple question, with a solution involving unchecking a box somewhere, but I can't find it. Whenever I enter a number in parentheses (for example: "(187.13)") into a cell Excel automatically converts that number to a negative--- "(187.13)" becomes "-187.13". I've been using the apostrophe option as a workaround (i.e., '(187.13)) to store it as text instead of a number, but this is becoming a hassle because it recognizes that (187.13) is a number and alerts me with an error message of numbers being stored as text.

Short Version: Basically, I want it to stop automatically making "(187.13)" become "-187.13" but I don't know where the setting is.

View 7 Replies View Related

Add A Column Of Numbers, But Ignoring Negatives

Apr 7, 2009

I'm trying to SUM a column, but it has a negative number in it. I want to sum the column but ignore the negative number.

I.E.
5
46
12
-15
3

so the total would be 66. How is this possible or would i have to use another formula instead of SUM.

View 5 Replies View Related

Allow Numbers Only In UserForm TextBox But No Negatives

Jan 25, 2010

I have the following code in a user form, attached to a data field that the user should fill. This code should alert the user if he enters a negative number i.s.o. a positive (and vise versa). Due language related issues, it is quite possible that the user will enter (by mistake) a negative sign but it will be at the end (500-) and the user will not notice this mistake. For some reason, my code does not pick up on this, and does not pop up the error message. Therefore, I decided that I need to check if the value entered by the user also contains a “-“ at the end of the string. This, I believe, will take care of the problem.

In excel, I would simply enter a formula with Mid and Len (to check if the last character is “-“) , but I don’t know how to implement it in my code.

Sub txt_sum_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
'Verify that a negative sign was added for expenses
With Me.txt_sum
Select Case cbo_act
Case "Expense",
If Me.txt_sum.Value > 0 Then
MsgBox "Number must be negative"
End If
Case "Income"
If Me.txt_sum.Value < 0 Then
MsgBox "Number must be positive"
End If
End Select
End With
End Sub

View 9 Replies View Related

Formula: Treat Negatives As Positives

Dec 8, 2006

i'm looking for a formula that gives the greatest number of a range
problem is that there are positive and negative numbers in the range
but I only want to look at the value (+/- signs are not important)

View 4 Replies View Related

Formatting Keyboard Commands (negatives In Red With Parenthesis)

Dec 15, 2009

I use keyboard commands whenever possible. They are much quicker than the mouse.

For years I have been using [Ctrl]+[Shift]+[1] to format cells as numeric with two decimal places, 1000 separator(,) and showing negative numbers in black with a minus sign in front.

I like to see negatives in red with parenthesis.

View 5 Replies View Related

Filter Auto-update As Opposed To Hitting Reapply Button Each Time?

May 29, 2013

If I am using the "filter" function in Excel and some of the values in my list change such that the filtering criteria requires certain rows to be add/removed. Is there a way to have this filter automatically update as opposed to hitting the "reapply" button each time?

View 1 Replies View Related

Sumproduct Formula And When To Use Comma's, Double Negatives, Addition

Jan 21, 2010

look at my attachment and see what I am doing wrong in my formula? I have a hard time understanding the Sumproduct formula and when to use comma's, double negatives, addition, etc.

View 2 Replies View Related

Custom Number Format For Negatives & Include Text

Aug 22, 2006

This is my formula and it returns: -55 bps.
=[ASK.xls]QTR!$AT$81&" "&"bps"

However, I want it to return (55 bps). I don't want to just add the parenthesis because in the future this formula could return a positive number. I tried to format the cell differently, but that did not work.

View 7 Replies View Related

Go Immediately To A Particular Cell After Inputting Data In Another Cell And Hitting Enter Options

Feb 20, 2010

I'm inputting data in E3 and after I hit enter I want B2 to be
selected. But only for E3 and only in one worksheet. And possibly a
further step... Sometimes the formula in B2 has picked up data from
another place depending on what value was entered in E3. If it's done
this then I won't need to go to B2, I'd want to go to A8 after E3
instead of B2.

View 9 Replies View Related

Enter 4 Columns Of Data In Row Then Shift After Hitting Enter?

Jun 1, 2014

I really know nothing about vba so here goes. I would like to enter data in a row with 4 cells of info. then hit enter and return to the first cell and move the row down. all four cells must have data entered. and all four must move down. i tried some code as below i found and i modified but it did not work as expected. this moved the row down when returning the cursor to A2. It also should not copy the data style of the top row.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column <> 1 Then Exit Sub
Application.EnableEvents = False

[Code].....

View 4 Replies View Related

Hitting Enter In An Unlocked Cell Without It Advancing To The Next Unlocked Cell

Nov 6, 2008

I have a locked spreadsheet with unlocked cells and checkboxes. The unlocked cells is for the user to enter text. The user navigation is top to botton in column a in sequential order by row.

For example: I have an unlocked cell in A1, then 20 checkboxes from A2:A21 and then another unlocked cell in A22. My problem is that when the user types text in A1 and hits ENTER - the cursor jumps to A22 (the next unlocked cell and scrolls the screen down accordingly. The user then has to scroll back up to select the checkbox in A2 and so on down to A22 before typing in A22.

I have created a command button that floats...that ultimately I would like the user to be able to select after typing in an unlocked cell(instead of hitting ENTER) and it removes the cursor from the unlocked cell - leaving the text entered - freeing the user to select checkboxes because excel didn't advance to the next unlocked cell.

View 4 Replies View Related

Value To Be Taken As Positive Only?

Aug 5, 2014

If i have enter any number in negative may be in cell A1 (Usually here the values will be derived by formulas not by manual entry), then it should get the result in positive (only Negative value to positive value only sign change no magnitude / value change).

Now i am using in B1 <=IF(SIGN(A1)<0,A1*-1,A1)>, if any negative value found then in B1 i can get positive value. For example -57 in A1 = 57 in B1.

Now my question is instead using Complicated IF & SIGN formula if there is any simple formula available ?

View 2 Replies View Related

Sum Two If Both Cells Contains Positive Value

Jul 12, 2014

If i want to sum A1+ A2 and A2 containes a negative number i only want to sum A1.

Like this:

Example 1
A1,A2
3,3

3+3 = 6 (Both cells contains positve number)

Exampel 2

A1, A2
5, -3 = 5 (A2 contains negative number only sum cell A1)

View 6 Replies View Related

Sum Only Positive Decimals

May 23, 2014

I have some problem when I would like to sum only positive decimals on userform, I would like to separate the numbers with comma (",") and sum them, the format should be "0,0" and only numbers and "," can be given in textboxes. How should I do this?

View 3 Replies View Related

Subtract But With Positive Sum

Dec 6, 2006

Im working on a time schedule form for my work. It all works good but it have one little error.

Lets say it looks like this
cell a1 has start time 22:00 and a2 has a end time 07:00. i know that i can switch the cells in the formula =sum((a1-a2)*24). like this i´ll get a negativ answer and that f.cks up the totalt becuse of the negativ answer i get.

is there a way to get 7:00 - 22:00 and 22:00 - 7:00 to calculate as positiv with one formula?

View 9 Replies View Related

Absolute (positive) Value

Mar 7, 2007

I was wondering how I can replicate Excel's function abs(), which simply gives an absolute value of some number. Is there a simpler way to do that rather than creating a loop to test a condition? For example, I have a line:

w_1 = Range("E2").Value / Range("E3").Value

w_1 can be either positive or negative depending on the sign of E2 and E3. But I need w_1 to be always positive, no matter what signs E2 and E3 have.

I tried

w_1=WorksheetFunction.Abs(Range("E2").Value / Range("E3").Value)

View 4 Replies View Related

Minimum Positive Value

Jan 13, 2008

in a column let'e say A

I have the following values
Total
11
20
7
-10
30
-5
-25
16
3
21
-8

I whant to have a variable = the row number with the minimum positive value which is in this case row number 9 and the column value 3

View 9 Replies View Related

Matching Negative Value W/ Corresponding Positive Value

Jan 23, 2008

I have a spreadsheet of invoices and credits memos (500+ rows). Is there a way to match the positive and negatives that match? For example if there is -40.39 in one cell and positive 40.39 in another that it could highlight both those cells. I was thinking to do it in conditional formatting however I can not get it to work. It does not have to be fancy I just need to highlight them because there will not be a lot that do actually match.

View 9 Replies View Related

Keeping A Number Positive.

Sep 22, 2008

In a basic formula, I need to take one number from another. But I need to keep the answer to zero, not a negative number.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved