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.
Related
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.
I am getting a report and trying to do a =vlookup(). I have found the issue being that one of the reports brings back some values as a Type(2), and the VLOOKUP is showing #N/A as the other one is a Type(1).
I have tried to format cells to numbers but that does not work. The only thing that works is manually going into the cell, typing an extra character at the end and then deleting it and then clicking out of the cell.
Is there a way to do this automatically or something?
Say we have a column of values from C2 through C100 that have text values that look like numbers, but are not.First format the cells to General. Then place 1 a cell; copy that cell; PasteSpecialMultiply over the the cells in column C.
Just changing the format of the C cells will not change their values.
I am trying to substitute a specific part of a formula for the text contained in a different Cell.
The formula is:
=SUMIFS(Data!$C$2:$C$300000,Data!$O$2:$O$300000,"c285",Data!$G$2:$G$300000,">"&DATE(2017,1,1))
This formula is the same all the way down my spreadsheet although it should only be in cell O1. I want to change the part of the formula that says "c285" to match the value in the cell in each row
Is there a way to do this without me doing it manually?
The forumula can be seen in all the cells in Column O, they are all the same as they all have the same formula at the moment
Route 1:if you want to do it programmatically -> take a net language of your choice
take the cell content, search for the position of C1, change that to C +iterator
save it to the cell
Route 2: change the first few cells, delete the rest. Select all the correct cells, click on the right corner, pull down till you got all your rows auto completed
(this works for simple formulas, dates and so on. You would have to test this)
And always have a backup copy
I want to create a formula that looks up for a specific text in the range in provide or column and if it finds the text, write that text or the text in the right column in another cell. I am currently using this formula:
=LOOKUP("Haider",O11:O16,E1:E6)
However even when it can not find Haider in the range O11:O16, it still writes the text in the column E1:E6 to the cell in which I wrote the formula.
Also, as there would be only a single word in the entire column at one time, you
could help me with a formula that simply copies that word to a cell of my choice.
Another question is that how can I combine this with conditional formatting? For example, if I want to find the text and if it is found the range I specify, it should turn another cell into red or any color.
The first part of your question is answered in the comment from Byron Wall.
For the second part of the question, if you want to find the first or only cell containing text in a range, the formula is:-
=IFERROR(VLOOKUP("*", O11:O16, 1,FALSE),"")
If you want to find the first or only cell containing anything, the formula is
=IFERROR(INDEX(O11:O16,MATCH(TRUE,O11:O16<>"",0)),"")
but you have to enter it as an array formula using Ctrl-Shift-Enter.
For the last part of the question, supposing you wanted to highlight the cell in E1:E6 corresponding to the cell in O11:O16 containing "Haider", you would need the formula:-
=$O11="Haider"
(this compares E1 with O11, E2 with O12 etc. because of relative addressing)
Highlight E1 to E6.
Go to 'Conditional Formatting'.
Select 'New Rule' and 'Use a formula...' , enter the formula and choose a fill colour in the Format option.
I am creating a spreadsheet which will be uploaded to a database and there needs to be strict validation.
I need to ensure that if cell A2 has text in it, then cells C2,D2,F2,G2 must have data.
I would like to do this with colour - if A2 has text then the other cells are highlighted red until they contain text, then the background colour changes back to white. (The cells listed are REQUIRED and must contain a value).
There will be about 1000+ rows in this spreadsheet and I have attempted this using the data validation but it would involve me going in row by row.
Data validation does not require you to do row by row, by default Excel seems to make it so (by fixing row and column with dollar signs), but that can be easily changed.
What you can do is create a formula in your conditional formatting for the top most row where you want this applied to, now get rid of the dollar signs in front of the row numbers in your formula and extend the range where this applies for to all the thousands of rows that you want it applied to.
formula in your case for C2 will be: =AND(LEN($A2)>0;LEN(C2)=0) this can be applied for C2:F2000 :
Or what you can do is specify this formula for C1 (=AND(LEN($A1)>0;LEN(C1)=0) ) and apply it to C:F.
No need for VBA.