Subtracting From Value In Cell
Sep 24, 2006
I am tryinig to use an if statement but I don't have it correct. If columns E, F, and G are not null I want it to subtract 3 from the Total column. Right now it is subtracting from G.
Sub SubtractPoints()
Dim I As Long, subpoint As Long
With ActiveSheet
subpoint = . Range("h65536").End(xlUp).Row
For I = subpoint To 2 Step -1
If Not .Range("E" & I) = "" And Not .Range("F" & I) = "" And Not .Range("G" & I) = "" Then
.Range("H" & I) = "=RC[1]-3"
End If
Next
End With
End Sub
View 2 Replies
ADVERTISEMENT
Oct 31, 2006
I have added a worksheet to a workbook, a co-worker will populate another worksheet within is workbook. The worksheet the co-work populates is a schedule. On my worksheet
I've set a possible units per day value, then pull from the schedule, starting from the top, the order that can be done in this time frame.
My problem is every so often in the schedule she will total the units in a cell (the units for each order are in one column and the total is also in this column, and this has to be this way for others in the plant). My formula checkes the sum of the units in this column, but it includes the cell that has the total units. This is the only cell that has a value in it on this row. I was trying think of some way to check the order number column for a blank, and if it was then subtract the value in the cell that has the units total in it.
View 10 Replies
View Related
Sep 25, 2013
If in Cell A2 I have a function that updates it's number value automtically (i.e. From 5 to 7) and in cell B2 I have a value I wanted subtracted to the value Cell A2 updated by. Is this task possible?
In the I.e example, cell A2 had an updated value by 2, will it be possible to subtract that value in Cell B2 and continue doing so if Cell A2 kept updating?
View 4 Replies
View Related
May 15, 2014
Say I have the number 325 in A1. Each time I type a number in A2, B2, C2, D2, E2, A3, B3, etc... I would like the number (325) in A1 to be reduced.
Also, how do I create a pull down list?
View 6 Replies
View Related
Jan 18, 2009
If I have the following: =SUM(E2:F2) - G2). So lets say that E2 has 50, F2 has 60 which = 110. Now I want to take that 110 and subtract it from what is in G2 and put the result in H2.
View 2 Replies
View Related
Jan 12, 2012
I have a column range,say (a1:a45) that has a 2 digit numerical value, next to that I have a column range, say (b1:b45)
I want to test subtract the value in b1 from the value in a1
if the answer is equal to or greater than 0 I want to colour the cell green.
if the answer is equal -2 I want to colour the cell yellow.
if the answer is less than -2 I want to colour the cell red.
View 9 Replies
View Related
Jul 10, 2012
I'm decently competent at VBA but no real experience with userforms. I have a very simple 3x2 table:
Type $Amount
Cash $xxxxxx
Product A $yyyyyy
Product B $zzzzzz
I want a simple userform that moves money between the products, ie the user selects a money amount in the form (ex: $1000) and that amount is added from one product and simultaneously subtracted from the other. Note that the amount selected would be subtracted from one product's current balance and added to the existing balance of another product. No new money is coming into the system.
View 6 Replies
View Related
Jun 19, 2014
I was wondering if it is possible to get the SUM function to:
1) Add numbers in cells that contain letters or no letters.
2) If there are brackets that cell would be subtracted from the total, again ignoring any letters.
For example:
A1 = 3 ABC
A2 = (3 ABC)
A3 = 4
3 ABC + (3 ABC) + 4 = 7
View 5 Replies
View Related
Oct 26, 2012
I keep getting an application error, in debugging the underlined line is the source.
Sub blank()
Dim c As Range
For Each c In Range("C1:C100")
If IsEmpty(c) = True Then
c = Range("c").Offset(0, 1) - Range("c").Offset(0, -1)
End If
Next
End Sub
View 4 Replies
View Related
Jun 9, 2014
Simplifying the following formula:
'=((F17-F17)*D17)+((F17-F16)*D16)+((F17-F15)*D15)+((F17-F14)*D14)+((F17-F13)*D13)+((F17-F12)*D12)
Its basically the sum product of column F time column D...however, all the F values are first subtracted from the last F value; Obviously I could just have an extra column to calculate all the new "F" values the issue with that is that I want to be able to drag down the formula and so the value F17 changes for each last value in column F...
View 5 Replies
View Related
Jan 20, 2009
I have two Ranges, which I view as Arrays or Matrices, I want to subtract the two (which do not overlap or union in any way) to get a new third range of the differene. This new range should be the same size, and can be considered a difference of each cell in the range. Note both ranges are already identical in size.
Any help solving this, searched up and down for hours.
Note; Im trying to avoid looping, as this might become incredibly inefficient if the ranges grow to big, looking for alternative that is faster, someone said maybe excel.evaluate
View 14 Replies
View Related
Dec 14, 2008
if lic# in column a = lic # in column e, i would like to use the corresponding avg wt in column f to subtract column b.
would i have to use if and vlookup function? (i.e. =if(a=vlookup(....), f-c)?).
View 9 Replies
View Related
Jan 30, 2007
I have three cells... A1= entry time & H1 exit time...both are formated as such Custom #0":"00 so i don't have to enter the colon with every entry and exit time... my issue is that i want the third cell to count the minutes in cell A1 & H1...
View 9 Replies
View Related
Feb 15, 2008
I saw this answered somewhere on here but really didn't understand.
I'm trying to set up a sheet for my hours worked for the week.
I have the total per day in H2 through H6 In I2 through I6 I have an accumulative total for the days, so assuming I work 8 hours a day, I2 would be 8:00 I3 would be 16:00 I4 would be 24:00.
In J2 through J5, I'd like to have the weekly accululative worked hours subtracted from 40 so that the total is what I have left work until I hit 40.
View 9 Replies
View Related
Jan 22, 2009
Start time is 2300 in A1
End time is 0100 (the next day) in B1
Difference should read 120 minutes in C1
I know this is possible, I think I've thought myself into circles on something that shouldn't be hard. Everything I've tried is giving me negative numbers and at some point I've tried using the +1 behind B1 to represent the next day.
Here are some of the formulas I've found throughout various posts and used.
=B1-A1+IF(A1>B1,1)
=B1+(A1>B1+1)-A2
=IF(A1
View 9 Replies
View Related
Mar 27, 2009
What would the formula be for subtracting two dates to get the numbers of years, months? I cannot get my formula to work.
Also, can Excel take a telephone number such as (555)-555-5555 can place the phone number in another field such as 555-555-5555?
View 9 Replies
View Related
Jun 25, 2009
Here's a simple one guys. How do I subtract 7:30 AM from 4:00 PM to give me 8.5 hours? At the moment it returns either 8:30 AM or (formatted Number - General):
0.3541667
View 9 Replies
View Related
Feb 5, 2014
I have a total number of hours I want to subtract from. Example in cell e3 I will have 800 hours. In cell f3 I have the number 2 (to represent 2 workers at 40 hours, so that should total 80). I then want f3 to multiply by 40, then that total subtract from the 800 hours in cell e3. Basically I want to be able to put 2 workers in a cell, have that multiply by 40 and minus from the 800 hours in cell e3. I want that to carry on for cell g3, etc.
View 1 Replies
View Related
Jul 3, 2014
I'm trying to program a spreadsheet for staff attendance at a school. In the spreadsheet the staff member has personal days, sick time, and sick time in the bank (sick time rolled over from last year). When they use sick time, it needs to come out of the bank first, until it reaches zero, then it should move on to the sick time accumulated for this year.
Staff attendance WIP.xlsx
On the left side is the staff name, sick time, personal days, and bank. Then are the school days for July (if a staff member uses sick time/personal day it is placed under the date it was used). On the far right is the total remaining amount that the staff member has left.
The formula I have for cell AF4 is: =MAX(0,G4-SUM(H4:AC4)) so that the cell will not go below zero.
The formula I have for cell AG4 is: =E4-(COUNTIF(H4:AC4,"P")+(COUNTIF(H4:AC4,"HP")/2)) So that when P for personal day is entered, it will take a whole day, and when HP is entered a half a personal day is subtracted.
I need to figure out a formula for cell AD4. I've tried a couple of formulas I've seen on other posts, but they weren't for a series of numbers like this. And when I put them into this particular spreadsheet, it would subtract the bank until zero, move on to the 'sick time' cell and subtract the SUM of all the days sick rather than subtracting what was left when the 'Bank' reached zero.
View 1 Replies
View Related
Oct 22, 2007
Is it possible to subtract a number from a column letter? I'm trying to create a sheet that does some helpful calculations. In order for me to finish it without a macro i need to be able to subtract a number in a cell from a column letter. Example F-5=A, The end i'm trying to achieve is to get a sum range to move left and right in this data set based on that number.
View 5 Replies
View Related
May 13, 2009
I am using excel 2003 and I am trying to subtract 20 days from the date in cell A3 in order to give me a date for me to order materials. However all I get is #NAME? in the cell.
View 4 Replies
View Related
May 28, 2009
Subtracting 1 day when the weekday is a Thursday. I need with the formula above (on AA2):
View 2 Replies
View Related
Sep 8, 2009
I'm making a table for myself to keep an eye on my hours worked every week. What i want is to be able to enter the start time and the end time and for Excel to find the time difference inbetween (not numerical mathematical difference) also i need to subtract a half hour from the time entered for monday thru thurs.
View 2 Replies
View Related
Dec 10, 2013
I have a large set of data in an array of many cells. I need to subtract a fixed amount from each of these cells without changing the location of the cells as there are many different references too them Is there a way to do this?
View 3 Replies
View Related
Apr 17, 2014
im looking for a macro that will take away the free stock value from the values in the following columns until the value reaches 0 then subtract from the next column with a value in it until there is no more left in the free stock to subtract. if the value reaches 0 it can be blank.
so for example as shown in the image attached cell b2 shows 150 in free stock, then the next column with a value in is d2 which shows 100 so takeaway until this reaches 0 which leaves 50 and this can be shown as blank now, then move to the next column which is e2 and this shows 30 so this can now be blank also, finally f2 shows 50 so minus the remainder from the original 150 which 20 and this should now be 30.
my data is in a pivot table so a paste special to another sheet may also be necessary. The amount of columns could also vary due it being a pivot table.
View 5 Replies
View Related
Feb 22, 2010
On my worksheet I have a date of birth formated yyyy-mm-dd. On my form, I want to be able to identify anyone younger than 16. I tried subtracting from today's date on the worksheet, but that didn't work too well for me.
View 2 Replies
View Related
May 30, 2007
I have a weekending date. I would like to subtract X amount of weeks from this date and end up with the weekending date less the weeks I subtracted.
View 10 Replies
View Related
Oct 7, 2008
In A1 I have this: $9.50.
In A2 I want to display the result of multiplying A1 with 10% and subtracting the result from A1.
I've tried this in A2: =SUM(A1*10%)-SUM(A1)
But it displays a negative number: -$8.55
I need it to display: $8.55
View 3 Replies
View Related
Apr 17, 2012
I am trying to subtract 45min from the time 00:05, but the result i am getting is 0:40 which is wrong.
I am using below formula.
=TEXT(ABS(B3-$A$3),"-h:mm")
Actual timeTime minusResults00:0500:45-0:40
View 1 Replies
View Related
Jun 18, 2012
I am trying to work out the response times to an event that my staff attend ( such as a fire alarm)
In C1 will be the time the event was called in, 23:55
In E1 will be the arrival time, 23:59
In F1 I want to show the time taken to arrive on site (response time)
This seems straightforward until the arrival time goes into the next day, such as 00:05 and this is when I have the problem
To make it more complicated, sometimes there is no need for an arrival time to be entered for some events ,with the end user leaving it blank or putting "NA" or "na" etc into the cell
I have tried the below formula which works to a point but leave me with an ######### error if the time is after midnight
=IF(E1="NA",0,IF(E1="n/a",0,E1-C1))
View 9 Replies
View Related