Linking cells in excel with a specific format - excel-2007

I am trying to link cells in excel on two different work sheets.
I am using the formula eg: cell1 = cell2 + cell3. The numbers that I have in cell2 and cell3 are in format of 100% (1) and 50% (2). I just want to add numbers 1 and 2 so that my cell1 will have number 3.
Is it possible to do without changing the cell formats?
Thanks a lot.

If you don't care about the percentages, just copy your column with the percentages and change the format of that column to value and in sheet 2, do addition on that column instead.
Unfortunately when a cell has a format of percentage and a user enters a number, it is converted into what it means given the context of the format. It's not like what is being displayed is wildly different than what is 'hidden' inside the cell. When you reformat a cell, that data is reformatted as well, so 50% becomes .5 even if you had originally entered 50 in the cell before changing it's format. Format is more than just 'display format' so maybe that's where the confusion is.
If you want to add the cells in the percentage row and not bother with reformatting the formula cell you can cheat and treat it as a string to get rid of that %. You could do =Left(A2+A3, Len(A2+A3)) that will give you the 1.5 answer without having to format te cell.

Not sure i understood your question but i'll give some elements:
formula and formats are separated in Excel, thus, you can set a formula in A1, say =A2+A3 but displays the value the way you wish
for instance, if A2 contains 100% and A3 contains 50%, then the result in A1 is worth 1.5
you can set the format of A1 the way you wish (Right-clic > Format cells > Number tab), for instance, decimal, the cell will then display 1.5 but if you choose percentage, the cell will then display 150%
Please elaborate your question if needed.
[EDIT] New answer thanks to your comment:
If i understand well, you want to sum up the values between brackets in your cell (whatever is before, event percentages in your case).
Then, you can try this in cell A3:
=MID(A1,FIND("(",A1)+1,FIND(")",A1)-FIND("(",A1)-1 )+MID(A2,FIND("(",A2)+1,FIND(")",A2)-FIND("(",A2)-1 )

Related

LibreOffice Calc: how to highlight the maximum value of ranges of cells at once?

I would like to highlight the maximum value for each group of cells using conditional formatting, and applying it at once.
In order to explain myself better, the file is something like this:
(But the real content has more than 1500 of these).
For each range in each column, I want to highlight the maximum value. So, for the range A1:A11, the cells A2, A5, A7 and A10 should be with a different format. The same for the range A18:A28, where A26 and A28 should be different, and so on for B, and C, etc.
I have tried selecting A1:I28 and apply conditional format where cell is equals to max(a1:a11) apply a good format, but it doesn't work well. It think I don't how to use the references in the sheet in order to be considered in a right way.
Any ideas?
AFAIK you can't do this "at once", thus in a single step. To get this working with a spreadsheet layout as in your example, you'll have to define the conditional formatting for each "dataset" separately (it would be easier if the spreadsheet wouldn't contain two "rows" (1st: 1-11; 2nd: 18-28) on the same sheet). With dataset, i mean the distinctive ranges A1:A11, B1:B11, ... A18:A28, B18:B28 and so on.
To be more precise: you need to define the conditional formatting rule for the first dataset of its row (in your example: A1:A11 and A18:A28, respectively), then you can apply it to the other datasets using format pasting.
To do so:
define the conditional formatting for range A1:A11 with formula A1=MAX(A$1:A$11). Notice the dollar signs - without them LO will compare A2 to MAX(A2:A12), A3 to MAX(A3:A13) and so on. The dollar signs make sure that every cell in A1:A11 will be compared to exactly that range only.
Select A1:A11, copy it;
Select B1:B11 and paste just the formatting, using the "Paste Special" functionality (Menu Edit -> Paste Special... or SHIFT+CTRL+V, select Format only in the Paste Special dialogue).
Repeat step 3 for C1:C11, D1:D11 and so on till I1:I11;
Repeat step 1 and 2 for A:18:A28 (formula should be A18=MAX(A$18:A$28));
Repeat step 3 for B18:B28 and so on.
If you try to paste the formatting to more than one column, LO won't handle the target range as entity but will define the formatting for each cell, thus it will define a conditional format for B1 with formula B1=MAX(B$1:B$11), B2 with B2=MAX(B$2:B$12) and so on. It's vital to have only one conditional format definition for each separate range, thus for A1:A11, B1:B11 and so on. You can control how LO had handled your modifications by checking the resulting conditional format definitions in Menu Format -> Conditional Formatting -> Manage....

Reference cell not calculating

I am having an issue with a cell that has a formula in it, but it's not calculating. I am using Excel 2013 and the data is as follows:
I have 12 cells(z14:ab17) the user will place a numeric value in. The formulated cell has a formula that uses the numeric cells to calculate a value, but all the cell displays is #VALUE!. The formula is
=IF((ISNUMBER(SUM(Z14:AB17))),PI()/4/32^2*(Z14^2+AA14^2+AB14^2+Z15^2+AA15^2+AB15^2+Z16^2+AA16^2+AB16^2+Z17^2+AA17^2+AB17^2),0).
In the VBA side, I have
Global Const PI = 3.1415927
All the user input cells are formatted for numeric values, and the formulated cell is also formulated to calculate and display a numeric value. Can anyone help with why the cells is not calculating? This did work at one time, but now it doesn't and I have no idea what could have happened. Thanks in advance

How to make dynamic cell in formula based on pointed value in excel spreadsheet

I have an issue with the cell range in formula and I don't know how to change it based on a predefined value in the spreadsheet. For example, from figure I have cells B8:B12=0 (5 cells), however, if I want to change range to range B10:B12=0 (3 cells) I should delete them from formula. How can I do the reference to a specific cell in a spreadsheet where I can simply change value 5 to 3 and it will change automatically, without interfering formula each time? I'm new to VBA, any help is appreciated.
As it was mentioned before, you should try offset function and do something like:
AND(SUM(OFFSET(D13,-1,-2,-(G6),1))=0). Then the cells in the range B8:B12 would be possible to change inserting range in cell G6.
Use the =INDIRECT function to define your target cells, e.g.
=TEXT(INDIRECT(A1), "")
If I entered the text B3 into cell A1, then this formula would return the text value in cell B3.
Let me know if it works for you.

Excel 2010 Conditional Formatting - INDIRECT Function

I have an ongoing table that contains info in columns A-K and an undefined amount of rows. I'm trying to create a rule that will highlight columns A-K in a specific row if the value of cell D in that row is less than or equal to a specific date.
I have tried "Use a formula to determine which cells to format" with this formula: =INDIRECT("D"&ROW())<"DATE" and applied it to $A:$K
This turned my entire chart orange...
I've also tried "Format only cells that contain" with this formula: "Cell Value less than or equal to" =INDIRECT("D"&ROW())="DATE" and applied it to $A:$K
with the same effect...
Can anyone help me to get this corrected?
I just figured it out:
=$D1>TODAY() format font to orange
=$D1<=TODAY() format font to black
Thank you #Phylogenesis for your help! I really appreciate it!

Number to be copied from cell with the same number format and show it as a label for a shape without any change in the number format

I have a cell in excel which contains a value, lets say 100000.
Now i want this value to have commas in between them to represent the thousands and millions i.e. 100,000. I can do this by changing the number format in the home menu.
Now i want this value to be copied from that cell and paste it as a label for a shape. When i am doing this the commas go away showing me just the numbers.
I want it to happen through VBA but this is not happening in excel itself.
Does anyone have a plausible solution for this?
In range object use Text property, like this:
Sheet1.Shapes(1).TextFrame.Characters.Text = Range("A1").Text