I try to sum from some sum in cell, but the result become "-"
=SUM(X136;X124;X188;X111)
= -
What must i do to fix this?
A dash (minus sign) isn't the result of a calculation. Therefore it's a substitute put there by a cell format.
Right-click the cell where the dash appears, select Format cells from the context menu, look at the Number tab. I believe you will see a Custom format. It might be as simple as "-", meaning that any result of the calculation is shown as a dash or it might be a formula like [>0]"-",0,0 with similar effect. Take note of it and set the format to "General"
Copy or write your formula to a cell the format of which you know not to be Custom, in fact, one where the format is "General". Since we don't know how the cell formats were set in your worksheet the only way to be sure may be to format a cell as "General" yourself. To copy the formula without the cell format from where you take the copy you must select the cell and copy the formula from the Formula bar (above the grid - don't copy from the cell). Then select the cell you prepared with the "General" format and paste the formula to the Formula bar (not directly to the cell). The result should be a proper calculation.
Related
I have a question about custom format cell , Which codes or characters in custom format cell should I use that when I copy a formula from another cell and paste in formatted cell then the result of formatted cell (displayed number) does not change and remain as before pasting?
More explanation
Suppose we have a table where the third column is the product of the first column multiplied by the second.
Then we change one of the cells of the third column using the custom format cell and the character “apple” as follows.
Now if we copy the second row cell of the third column and paste it in the fifth row cell of the third column, the word apple changes to the number 15.
My question is what character instead of “apple “ to use in the custom format cell that does not change the word apple after copying the second row of the third column and pasting in the fifth row of the third column? (for example add the characters "#*., # and etc. with apple may be was the answer
I had two fields with floating point numbers which are divided by each other and the result of the calculation displayed on cell C1. I then copied the same two values down to the second row. I formatted cell C2 to use numeric format with two decimal values only. Lastly, I proceeded to copy the formula on C1 and paste it on cell C2 using "Paste Special --> Formula." You can see the cell format was preserved.
I don't understand this question because it lacks basic context. However, I think I was able to demonstrate that I was able to do what the OP said without "result of formatted cell not changing and remaining as before pasting."
UPDATE:
The example below shows a cell with a custom format of "apple" that formerly contained the formula a*b. After copying the contents of cell B2, I used "Paste Special" to paste the VALUE (nothing else) into cell B5. As you can see in the top-right of the image, the cell contains the value "2" but the custom format of "apple" is preserved.
Obviously, this is not a good example. Suppose that, instead of a custom format of "apple" I format that cell to contain a special format where I want to show a leading zero (if value is single digit) as well as two decimal places. The result is the same. The special formatting is preserved by "specially pasting" something other than the format of the cell.
If I repeat the same process as before, I can paste the value of "2" but it will be presented using the special (custom) format that I had before on the cell, because in Excel, the paste operation copies the value as well as all the metadata of the cell. To avoid this, "PASTE SPECIAL" is the option.
That said, there might be a way of protecting the worksheet to prevent formatting to be overridden in a paste operation. Since I am not an Excel super-user, I don't know if there is a way to lock this information globally. I assume there is a way, but I just don't know it.
I want to apply a conditional formatting (CF) rule to a group of cells to individually colour them if their individual cell values are greater than a threshold (in this case >=5). To illustrate:
The top row shows how I want the bottom row to look. For the bottom row I cannot figure out how correctly format according to cell-specific formulae.
The problem is identifying a way to specify cell-specific CF formulas in a single operation for a group of cells - as you can by pasting/dragging normal cell formulas. I obviously don't want to have to manually specify the formula for each cell!
Grateful for assistance.
Select the rows or columns or range that you want to conditional format,
Enter the below formula in the formula bar in conditional format and choose a fill color,
=AND(A1>=5,ISNUMBER(A1))
If you are starting in row3, change the A1 to A3. The $ that you have in the formula makes it absolute. It should be relative.
You just select all required cells to format. Then go to conditional formatting.
Check what is the cell shown just before the formula bar (the single cell that represents the selected range, also called default cell) and use that cell in your formula without absolute reference. like B3>=5 or R3>=5
I have made my own Gantt chart in Excel, which is shown in this picture:
.
I would like to highlight the whole column (or until the last activity) depending on the date, as shown in the picture. I figured out how to highlight a single cell depending on the date, but not a whole column.
I don't know how to do it short of entering the date into the whole column, but I thought there would be something more efficient if conditional formatting is used.
If you'd like an entire range to conditionally format based on the value of one of the fields in the range, use an absolute cell reference. I couldn't figure out perfectly from your picture which cell contains the date, but I'll try to give you an example.
If you have dates in the Cells in Row 1, and you want to highlight the entire column when the row has today's date, the conditional format formula would look like below. (Assuming today's date is in cell C1, then the entire column from C1:C25 [the range upon which I applied the conditional format] will be highlighted).
Steps:
Highlight the entire range upon which you want to apply the formatting. In my example, I'm using range A1:H25
In the Excel Ribbon, select Home > Conditional Formatting > New Rule...
On Windows, select Use a formula to determine which cells to format. On macOS, first choose Classic from the Style dropdown menu and then from the second dropdown menu, pick Use a formula to determine which cells to format.
The formula will be =A$1=TODAY() [NOTE: We check cell A1 first because it is the first cell in our highlighted range. We choose $1 because the dates are always in Row 1. Change that to suit.]
Select the format you'd like to apply
To test out how it looks, press OK
I would like to color cells in each row based on the value of a cell in the same row and then do the next one.
How do you set the formula to be able to color the cell if not equal to a reference cell on the same row?
So I just want to change the color of a different cell than reference cell which will have a different value for each row.
In Excel you will need to create a formatting rule, within the modal select the option that you want to use a formula to decide what cells to format:
Within the edit box you can type the formula that is used. The formula in the example will check whether the value of the 1 cell in the column is not empty. If this is true, the cell will be formatted as specified in the format preview.
Mainly using the ROW and COLUMN functions in Excel you can get access to the current Row and Column of the Cell for which the formula is executed.
Given the input:
Select Cells B2:G6 and click on Conditional Formatting
Your prompt will look different on Windows, but the important part is "Use a formula to determine which cells to format" The formula is =B2<>$A2 Please note the lack of $ because it needs to be flexible (except for the reference cell column which in my case is A)
Final result is:
Conditional formatting foes not need to operate on the cell you are formatting. Using a mixture of $ and non-$ formatted formulas, you can set highlighting accordingly.
Note to make sure this works correctly, highlight the area to be formatted first, and note where you start. e.g. If I wanted this to apply to A2:A50, then I would highlight A2 first, and make the formula reference row 2.
Also, note that you will have to type in the formula. Any clicking of cells will automatically put in $ signs to fix the comparison to that specific location, which is not the behavior we desire
e.g. To format A2:K50, when the H value in that column is 7
Highlight A2:K50
Conditional Formatting -> New Rule -> Use a formula
formula would be =($H2=7) <- this will fix the column to be H, and vary the row accordingly
Format as desired
e.g.2. To format based on previous cell
Highlight A2:A50
Conditional Formatting -> New Rule -> Use a formula
formula would be =(A2<>A1) <- this will check the row above each time
Format as desired
I am trying to implement the following logic but my formulas are not encompassing all possibilities.
Am I able to accomplish the following using the approach outlined below?
C5 has a start date(yy/mm/dd), 2013-10-01.
D5 has an end date(yy/mm/dd),2013-10-23.
F3->CX2 has 7 cells merged with the monday's date in the cell.
Example: F3: 30-Sep-13, M3: 07-Oct-13, T3: 14-Oct-13.
F4->CX4 and below are the unmerged seven cells, therefore you have seven cells below each week cell.
My goal is to use Conditional Formatting when cell has value TRUE to fill the background colour of each individual cell between the start and the end date. However I am having trouble determining the correct formula. I have tried the following in F4 and across and below but none have proven to work for all scenario's:
F4=AND(C5=F3, D5>=F3) F5=AND(C5=(F3+1), D5>=(F3+1))...
only fills the cell for the start date not all the cells between the start and end date.
In short, I need to identify the start cell and fill it, continue filling all cells until the end date.
Should this be a macro with a while loop?
***I Believe I have solved my question with the following formula:
=IF(AND((F3)>=$C$5,(F3)<=$D$5),TRUE,FALSE), =IF(AND((F3+1)>=$C$5,(F3+1)<=$D$5),TRUE,FALSE), =IF(AND((F3+2)>=$C$5,(F3+2)<=$D$5),TRUE,FALSE)...Then after 7 cells it becomes: =IF(AND((M3+1)>=$C$5,(M3+1)<=$D$5),TRUE,FALSE), =IF(AND((M3+1)>=$C$5,(M3+1)<=$D$5),TRUE,FALSE)
Should this be a macro with a while loop?
It seems it does not have to be, though that depends upon my interpretation of your question, which seems odd if only because the conditions are not in the rows for which they trigger the formatting.
Select the applicable range starting in F4 and HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true::
=AND($F$3+COLUMN()-6>=$C5,$F$3+COLUMN()-6<=$D5)
Format..., select choice of formatting, OK, OK.
Here's a stepwise view on the problem as I see it:
Set up your data and include the actual date of your "weekly view" as part of the sheet:
Add conditional formatting to a single cell (say, Monday of Week 1) that applies to "a formula to determine which cells to format":
Copy-and-Paste-formats to the remainder of the cells:
The result should resemble:
Change the actual cell formatting to "" to remove the date from view:
The removes the capability to insert any content in the cells (but that wasn't part of the question). If you want to insert content and maintain colouring, you can base the conditional formatting on a similar-sized/shaped layout elsewhere in the sheet and format it accordingly. For example, the following layout provides this yet allows you to enter content in the conditionally formatted area:
Use the formula conditions. I put a start date in A1, and an end date in A2. Modify as needed per your requirements.
Then I will apply conditional formatting to values in range E1:E6. Again, modify as per your requirements.
Then simply use Highlight cells Rules > Between
Then, select your start/end values and press OK. Voila!