I have a spreadsheet with the following format. I was given this spreadsheet to use so I'm not sure what use these formulas for dates have in opposition to normal text.
Along the first 4 rows of each column:
K2: 2017 [=TEXT(K$5,"yyyy")]
K3: April[=TEXT(K$5,"mmmm")]
K4: Wed [=TEXT(K$5,"ddd")]
K5: 05 [=J5+1]
In another sheet, I want to do:
=Sum(K6:N6)
=Sum(K7:N7)
At the start of every week I have to change the columns to the dates of that week
=Sum(O6:S6)
=Sum(O7:S7)
Instead of manually entering the range of columns each week for the 40 rows that I have, Is there a way I can type in the date, or the column in a separate cell and use that as the object of the formula so I only have to enter a start column and end column/or date and the list will all update?
Not sure about the whole picture, but the answer to your question is yes, you can have a special cell (or several cells) where you can keep some parameters.
In order to use the value from such cell in a formula you have to specify it with the "$" characters, this way the address of the cell will not change when you copy/move the formulas around.
So, say, you want the parameter to be in cell A2 - in the formulas you have to use "$A$2".
Another way is to use named ranges. You can assign a name to a cell or range of cells. THe simplest way to do so is to select the cell you want to hold the parameter (let's say it's A2 again) and then click into the box leftmost to the formula bar (where A2 is displayed) and type there a name you'd like to use, for example "STARTDATE" and press Enter. You have just named your cell. Now in a formula you can use STARTDATE instead of cell address, which is even better, because you can use a meaningful name and the formulas will be easier to understand.
Related
I have a master workbook with two columns: names and formulas, which are specific for certain names. Generally, there are some 300 different names and 10 different formulas. What I need is to insert that formula in another sheet when some of this names appear - some kind of vlookup formula which won't give me value but formula.
And second part of a problem is how to make this formula (if it can be somehow inserted) dynamic and use relative values for calculation from same row in calculation sheet....
Please see my simulation below. My formula is F3 (ignored = sign) and its name is Name1. For test purpose, I typed 7 into cell F3 and 8 into cell F4.
With the formula below I typed in sheet2, I am able to call the formula of =F3 and change the reference given to cell F3 to F4 and reach to result of 8 in master sheet.
=INDIRECT("Master!"&SUBSTITUTE(VLOOKUP("Name1",Master!$I$3:$J$10,2,FALSE),"3","4"))
Maybe you can solve your puzzle by using functions I used in above simulation (INDIRECT and SUBSTITUTE).
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.
How can I change my excel formula if I need to replace direct reference to the cell by the column name of this cell? For example, instead of
SUM(A1:B1)
I want to use something like
SUM({Column1}:{Column2})
I know about structured reference, but I can not convert my excel dataset into named table.
Do I have any options?
This answer assumes that the column name is the content of the header row for that column.
Say we have data like:
and we want to sum part of the row based on certain months, say between Feb and Jun. In B6 enter Feb and in C6 enter Jun and in D6 enter:
=SUM(INDEX(A2:L2,MATCH(B6,A1:L1,0)):INDEX(A2:L2,MATCH(C6,A1:L1,0)))
So by changing B6 and C6 we can change the part of the second row we are summing.
EDIT#1:
If we re-arrange the headers, the formula should adapt to the re-arrangement
The formula I posted was plain-vanilla. It should work on old versions of Excel as well as the current version. I am using the US Locale. You may need to check the spelling of functions and may need to use a ; rather than a , as the field separator character.
I have a schedule with team member names and the column headers are half hour time intervals. I want to shade the cells of hours each person does not work with gray according to their shift schedule, so that I know not to schedule that person during that hour.
I have created a separate table with each person's shift schedule, and the names appear in the same order as in the schedule.
Is there any way to conditionally format the cells at once? There has to be an easier way then what I am doing now...which is one by one clicking on each person's cell and creating the formatting formula.
I can't copy paste the formatting because the formula still refers to the previous person's shift on the other table. I need it to refer to the next row.
The formula I use for conditional formatting is:
='Job Functions'!$O$5>$C$9
Where Job Functions is the sheet that contains the shifts, O5 is the shift assigned to that employee, and C9 is the column header on the schedule (6:30am). I just clicked on the cell and created a new conditional formatting rule from the excel ribbon on top...no vba.
If there is a VBAsolution to this that'd be great! I'm fairly new to VBA
Conditional formatting works like this
Let's say I have an array of numbers in A2:E5 and a header row in A1:E1. I want to have my array of number be green if the value of the cell is greater than it's column header. That is to say I want to compare A2>A1, B5>B1, D4>D1, etc. this means I want the header row comparison to be constant.
In Excel formulas you use the $ symbol to maintain constant references. Since I want the row to stay constant but I want the column to be relative to the cell in my array of numbers my header reference will be A$1 (column is relative, row is locked).
This is just the formula used to determine if formatting will be applied or not. If it returns true then the conditional formatting is applied, if it returns false then nothing happens.
However, where the formatting is applied is determined by the Applies to reference. In my example below I am applying the formula A$1<A2 to $A$2:$E$5. This means that in the cell A2 the formula A$1<A2 is used to determine if formatting is applied, but in B3 the formula B$1<B3 is applied. This is the same logic as if you were to have dragged the formula itself into these cells.
If instead my Applies to formula were $B$2:$E$5 this means that B2 would be colored green if A$1<A2, and B3 would be colored green if A$1<A3.
So with all that your formula should probably be
='Job Functions'!O5>C$9
drag and drop it down to fill the other cells
I have the formula below that I'm using to link to a certain sheet and cell in my workbook that contains a graph for each entry. On the sheet I link too, each graph is about 20 cells down from the previous one. I have over a 100 graphs now and it will grow in time so I was trying to use the HYPERLINK formula rather than the Hyperlink button for this. I thought I would be able to just insert the formula in the first row, paste it in the second row with an added 20 cells, highlight the two and drag it down but it will not count in increments of 20.
Is this even possible?
=HYPERLINK("#'Trends'!A25","Click To View Trend")
I'm thinking you will have to use some type of concatenation to get the behavior you are after. To do this, you may want to employ a "helper" column. For example, put the "numbers" you are after in column B -- below you will see that I incremented it by 5.
Now your HYPERLINK formula in cell A1 is written as:
=HYPERLINK("[Book1]Sheet2!A"& B1,"Click Me for Sheet2, Cell A"&B1)
(Assuming the workbook is called Book1. Now, I can drag that formula down and it will update "dynamically" to account for the changes in column B.