If Cell Has Value Calculate
Aug 20, 2007
I am setting up a spread sheet to compare an invoice between 2 suppliers. It has formulas throughout and a total column. If no data is entered in cells then total column has "value" in it. How can I eliminate the"value" while still keeping formulas in place. Not all cells will have data in them on every instance. But I still need all formulas to be saved
View 4 Replies
ADVERTISEMENT
Mar 1, 2012
I have a string of text in cell A2. In cell B2 of my spreadsheet is a formula that calculates a number based on the text string in cell A2.
I want to write a VBA loop that removes a single character from the cell A2 string, then calculate the new value in cell B2. I want this loop to continue until the value in B2 falls below a set value (in this case 60).
My code so far
Sub trim_text()
Dim mytext As String
Dim myanswer As Integer
mytext = Range("A2")
myanswer = Range("B2")
Do While myanswer > 60
mytext = (Right(mytext, Len(mytext) - 1))
Loop
End Sub
This obviously does not work. In my excel table I have a formula in cell B2 to calculate "myanswer" will this work, or does that code have to be placed into the VBA code?
View 3 Replies
View Related
Dec 30, 2013
I have an excel sheet in which I have 3 columns, Column A is giving me a week number from date entered in Column B. Column A is a merged Cell. There are values in Column C.
I want to be able to sum cells of column C ( not entire Column, select few cells) who show 1 (representing Week number) against them in Column A. I have been trying to sort this out since Thursday and have had no success.
Please see attached example : book1 (2).xlsx‎
View 3 Replies
View Related
Mar 6, 2007
Im wanting to do a sum calculate if there is anything in the cell.
Ive tried using the 'count' and 'count if' but both return values of zero.
There are words in the cell, rather than numbers.
I want it to return the value of cells with data in them, and exclude those with nothing ("") in them.
View 9 Replies
View Related
Mar 12, 2014
I have sheet where percent change is calculated. All of the data isn't put in at once, so i don't want it to a calculate the percent change until both cells contain a number.
Here is the formula i am using: =IFERROR((D4-B4)/B4,"")
Right now when i fill in the first value it automatically returns a percent change of -100%, i want it to wait until both cells are filled with data.
View 5 Replies
View Related
Nov 21, 2008
I have this: =LOOKUP(Budget!J3,B11:B42,E11:E42) RESULT: 5%. what I want: =LOOKUP(Budget!J3,B11:B42,(X3)11:E42) RESULT: 5%. I want excel GET the value inside X3 and and go to the other sheet with this variable. X3 = E
View 2 Replies
View Related
May 30, 2012
I neeed to perform a calculation on some cells but one of my cells in the calculation may contain "".
The cell in question is $H6. Sometimes there will be a value, other times "" but it throws an error when it's got "".
Coumn H has this formula
Code:
=IF(NOT(ISBLANK('Internal Data'!G2)),'Internal Data'!G2,"")
And this is the formula that throws an error
Code:
=IF(AND(L$5>=$H6,L$5L$5,$AC$3,""),"")
and the error message
A value in the formula is of the wrong data type
View 3 Replies
View Related
Apr 2, 2009
I would like a macro to calculate the number of days for a date if cell has date. For example If cell A has a date cell B should automatically do the calculation for =TODAY()-A1
Cell ACell B
3/21/09Calculation from Macro
3/22/09Calculation from Macro
3/26/09Calculation from Macro
View 9 Replies
View Related
Oct 13, 2007
I have in cell A1 12"x12"x12"
cell A2 105" x 17.5" x 4"
cell A3 4x4x4
cell A4 16.5x16.5x16.5
I need to break these up to calculate the total cubic inches.
There about 200 of the entries similar to those in the example.
View 9 Replies
View Related
Oct 22, 2007
In one cell there is a combination of number and text(i.e) 10 Inches or 100 Nos. In another cell this cell is quoted as reference for calculation. Ex. A1*B1/C1 wherein A1 contains Number, B1 Contains Number whereas C1 contains Alphanumerical as mentioned above. But, the contents of cell C1 should be treated as numerals and taken into account for calculation in the above manner. Can explain how to format the Cell C1?
View 3 Replies
View Related
Oct 18, 2006
Basically, I'm trying to have a cell (eg.A1) where i can input a dollar value and when enter is pressed, on another cell (eg.A2) the dollar value gets added, then the original cell (A1) is cleared for the next input.
Then when I put the next input (A1) I want it to add on to this running dollar total (A2) and yet again A1 is cleared for the next input.
In addition to this I require an additional cell (eg.A3) that when each time a value is added in A1 it counts the times this is done.
View 9 Replies
View Related
Dec 5, 2013
I have a file wiht 2 sheets, on one sheet I have a macro that opens 25 other excel files and pastes information into the sheet in a specific order. Then on the "main" page I have different calculations based on the information from the other sheet.
The Information is listed in a row so for example B2:M2 or B3:M3. If a value has not been assigned the vcell will be empty (No formula or anything, completely empty)
The Value in the cells will be between 0 and 100 (its a score from 0-100) so in the "main" page I want a formula that calulates the LATEST score (It will always be the first one on the furthest left and the latest one to the furthest right). Is there any easy formula to calculate this?
For example:
----B-----C-----D-----E-----F-----G-----H-----I-----J-----K-----L-----M
2|-10----30----75----85----93----12---12
So in the example I2:M2 is empty so the latest score would be H2 so thats the value I want to show on the main page.
View 5 Replies
View Related
Jan 4, 2014
String Multiples for 3 different criteria in same cell -- "if", "or" "abs" --- not sure if any of these are correct
1) Criteria 1 and 2: In cell "E" I am wanting to minus "B from C", if "A" is greater than or equal to and less than "=>1000 or <15000"
2) and the other criteria would be if "A" is greater than or equal to ">=15000" then minus "b from d" -- answer would also be in the same cell "e".
I hope I am saying my needs correctly. Basically, I have 3 different sales criteria with 3 different bonus offers. One offer is for sales less than 10,000, another offer is for the range 10,000 to 14,999 and the last is for the range 15,000 or more. I am actually linking the values from different worksheets, however I have used generically "A, B, C, D and E".
below are the 3 separate formulas that do work on specific individual rows. However, I really need the criteria for all three variables in the same cell. Right now I am just copy/paste the appropriate formula that fits the specific value in each row.
=IF(summary!$E8>15000,SUM(F3-summary!D2),0)
=IF($E4<15000,ABS(F4-summary!D3),IF($E4>=10000,0,(F4-summary!D3)))
=IF($E14<15000,ABS(F14-summary!D13),IF($E14>=10000,0,(F14-summary!D14)))
View 6 Replies
View Related
Jun 23, 2009
i'm not sure how to describe this. i've never had to do this before. here is what i'm trying to do. and it's not working.
=MIN(B2:B(G2-G3))
basically instead of saying =MIN(B2:Bx)....i want the "x" to be variable based upong the G2-G3 condition. can this be done some other way?
View 3 Replies
View Related
Oct 12, 2010
Is it possible to use a formula to calculate a cell reference within a formula? e.g. is there some way I could reference cell C47 in a formula by saying C(40+A2) where A2 contains the value 7. I often want to sum a certain number of cells in a list, from the first one to the nth one and need to be able to calculate rather than hard-code n.
View 5 Replies
View Related
Oct 29, 2009
I have a row of data starting in cell E4 that could, theoretically, go to the far right end of the spreadsheet. I need to enter a formula in cell D4 that calculates the average of every other cell in this row, starting with E4, that is E4,G4,I4,K4...
View 9 Replies
View Related
Sep 28, 2011
I need to calculate the amount of time my daughter will be in daycare which varies each week. I have to give the same sheet that I have hidden calculations on to the center. I have to have the time she arrives at 7:15 AM (Cell A1) however they don't start to bill until 7:45 AM (Cell A2) and continues until 11:30 AM (Cell B1) and need C1 to be total hours between A2 and B1
I need a formula that will calculate the hours between 7:45 AM to 11:30 ONLY if cell A1 has a time entered in it. If A1 is blank then it should calculate 0 hours.
Example (WITH something entered in A1)
Arrive Time End Billable Time Total Billable Time
A1 - 7:15 am to B1 - 11:30 am C1 - 3.75 Hours
Start Billable Time
A2 7:45 am
Example (WITHOUT something entered in A1)
Arrive Time End Billable Time Total Billable Time
A1 - to B1 - 11:30 am C1 - 0.00 Hours
Start Billable Time
A2 7:45 am
If it has to be in 24 hour time is there a formula that I can enter in another cell to convert 12 hour time to 24 hour time again ONLY if A1 has something entered in it?
View 2 Replies
View Related
Jul 23, 2012
I need a formula which can calculate row 60 for blank cell. If true then apply another condition which checks whether or not the cell above the row 60 up-til row 50 has any bold fonts or not. If true then show True and if false, show False in cell J1.
View 1 Replies
View Related
Nov 30, 2012
Today I have a project as follows:
I have value1, search value1 in a row, if found get cell address and store in cell10. Then value2, search in the same row, if found get cell address and store in cell11. Then calculate number of rows between cells with addresses in stored in cell10 and cell11.
How do store the addresses and how to calculate this number of cells?
I need that number to use in next FOR loop.
View 2 Replies
View Related
Jul 25, 2014
I'm after some vb code that will only allow the range - PRODUCT_Selections!A2:C370 to calculate, when something is changed in the range - Input!T11:V500
I would like all other calculations in the workbook to continue as normal.
View 9 Replies
View Related
Oct 18, 2006
I'm trying to have a cell (eg.A1) where i can input a dollar value and when enter is pressed, on another cell (eg.A2) the dollar value gets added, then the original cell (A1) is cleared for the next input.
Then when I put the next input (A1) I want it to add on to this running dollar total (A2) and yet again A1 is cleared for the next input.
In addition to this I require an additional cell (eg.A3) that when each time a value is added in A1 it counts the times this is done.
View 9 Replies
View Related
Oct 24, 2006
There is a column in my spreadsheet which needs to reflect a " percent done".
I used to enter just a numerical value in (eg. 20) to reflect 20% done. My boss wanted it to show as an actual percentage (eg. 20%). I changed the format to Percent, Zero decimal places. Then you had to enter .20 to get the 20% to show.
Now my boss doesn't like that - and wants to be able to enter "20" to get the 20% to show. I put the following code in my SelectionChange event...
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'other logic
If Target.Column = Asc(PercentDoneColumn) - 64 Then
If Target.Value <> "" Then
Target.Value = Target.Value / 100
End If
End If
'end other logic
End Sub
My problem is that this works well when putting a new percentage in, but not for when you click on a cell that already has a percentage in it. For example, if you have .2 (displaying "20%" in the cell), and click on that cell, it divides that number by 100, and gives you 0.2%, displaying as "0%". I want to enter a number between 0 and 100, have it displayed and stored as a percent. At this point, I'd settle for the displayed, but would prefer to have it stored as a percent, too.
I also want it to not reset my value unless I'm putting a new value in!
View 4 Replies
View Related
Jan 10, 2007
I am working on an employee weekly schedule and would like to be able to calculate the amount of hours an employee is scheduled each day. For example; if you worked from 7am to 4pm, I want to have a formula that can determine that (7am to 4pm= 9 hours) then sum the total amount of hours for all employees scheduled that day.
Mon Tue Wed Thrs Fri Sat Sun Total
Employee 1 7-4 7-4 8-5 off 2-10 5-10 off 40
Employee 2 8-5 11-8 off 7-4 1-8 off 8-5 43
Hours 18 18 9 9 15 5 9 83
View 2 Replies
View Related
Jan 11, 2007
I am running the following code to check if a value = 0 is in specific cells. Because this code on all the cells runs each time any cell in the workbook is calculated, the screen flashes. I would like to stop this screen flashing by having the check done only when the specific cells are exited....
View 9 Replies
View Related
Aug 4, 2007
I have a set of values in the 2nd column (Col B). I have shown in Column C (I've added some notes to the right).
mon........7..........(first value, so nothing here)
tue........8..........na, or ERR.......................... 8 IS the highest value in B, so no math to do yet
wed.......10..........na, or ERR.......................... 10 is greater than 8…the new highest value in Col B
thu.........8...........(20.00)............................. The value, 8, is 20% less than the Highest value so far in Col B
fri..........6..........(40.00)............................. The value, 6, is 40% less than the Highest value so far in Col B.....
Namely, any value in Col B that is LESS than the highest, greatest, largest value that has preceeded it in chronological order will reflect by what % it is lower. (Eg, 8 is 20% less than 10). When a NEW higher value appears in Col B, there would be no answer in C (or simply "ERROR", or n.a.), and this new, largest value would be what subsequent values in Col B are compared to.
View 4 Replies
View Related
Aug 28, 2007
I'm having trouble with the "sister" formula I need to add. I've tried the function SMALL, but apparently not in the right format.... Here is some data again, with the answers I'm seeking & notes in Col C:
mon....6....(first data pt, so nothing here)
tue.....8.....33.33 (this is 2/6ths higher than 6)
wed...10....66.66 (this is 4/6th higher than 6)
thurs...8....33.33 (same as tuesday)
fri.......6.....00.00 (Equal to the lowest data pt, ie 6)
sat.....5.....(finally a vlaue less than 6, so: "ERR")
sun.....7.....40.00 (7 is 2/5th higher than 5)
mon....15....200.00 (10/5ths higher than 5)
tue.....4......(a new lowest value; "ERR")
wed....8......100.00 (4/4ths greater than 4)
That is, any value in Col B that is GREATER than the lowest, SMALLEST value that has preceeded it - in chronological order - will reflect the % by which it is greater. When a new lowest value appears in Col B, a simple text "ERR" would appear, and THAT new low value will be the new "target" the subsequent values in B are compared to. (In the example, once 5 appears, we stop looking at 6...)
View 5 Replies
View Related
Mar 25, 2014
I am trying to found or create a formula that will display cell width to the decimal place.
I can use the formula Cell("width"), but it rounds to the nearest integer. I need to display the decimals. For instance, if the actual column width is 8.43, the Cell("Width") formula will display 8. I need it to show 8.43.
View 3 Replies
View Related
Feb 6, 2009
I've set up a simple spreadsheet to keep track of my food expenses every month. The first column is for the date, the second is for the daily total expenses and then the next three columns are where I add the data which is then calculated into the daily total column.
I also have a total at the bottom for the entire month. Now what I want to do is I want to also have underneath the grand total, a cell which keeps track of my average daily expenses. Basically I want to divide the total expenses by the number of days which I've entered data. Now normally this would be fine but because I've applied the formula to all the cells in the expense column, it automatically lists every day as "0" rather than leaving it blank. So when it does the average calculation it's dividing my total by 30 days rather than by only the 7 days I have data for.
View 14 Replies
View Related
Dec 14, 2012
I am struggling with a formula, that will display a certain cell only if a match is found, else produce a sum. It will be easier to look inside the document rather than explaining it on here. Described as well as I can inside the document
(None of the data used is factual. I created it myself to replicate)
Overtime for Payroll.xls
View 2 Replies
View Related
Jul 7, 2014
I have an image overlapping a range of cells. I want this code to scan the pixel at the center of the cell, find out what color it is, and set the entire cell to that color, for each cell. Unfortunately with the GetPixel function I have to specify the x and y coordinates in terms of pixels from the top left corner of my monitor. The "CurrentCell.left & CurrentCell.top" method is not giving me the right location (Should start at cell AA1). If you would like, open up the file, go to sheet 2, insert an image, and click "Generate Field from Image". I set the cursor to follow the current position so you can see that it is selecting pixels from the corner of my monitor rather than cell AA1. Is there a way I can calculate the screen position of the top left of cell AA1?
Domino App.xlsm
[Code] .....
View 7 Replies
View Related