How to Multiply Multiple Cells with a Constant Cell - excel

I had a table in excel where prices of products are written in US Dollars. I want to change these cells to Euros and some markup so I had to multiply all these cells with a constant cell which contains something like this =0.86*1.03*1.15.
The problem is I had to keep initial US Dollar amount on the formula because I had to change this constant cell regularly due to currency and markup changes. So every time I change it, it has to multiply with the initial amount.
I tried to set multiply formula to each cell but there are too many to write it every cell the same formula. Is there any option to set a formula to apply all those cells where multiplies initial amount with the constant cell?

So, you should do something like this, assuming the constant is in cell A1 and the prices in cells A5 onwards.
In cell B5 enter:
=$A$1*A5
and drag down as far as needed.
Edit, based on comments: if the values are in an existing table, then the calculations could be performed in a helper column then copy / pastevalues back over the original prices...

Related

LibreOffice highlight cells if they are the same as a specific range

Master and Step Chart
Hello, I'm using A4-E4 as a "Master" code, and incrementally using A5-A8 to replace A4, B5-B8 to replace B4, etc etc first replacing one number of the "master", then two different numbers, etc until I have basically every combination. At some point the same number as the "master" is going to be generated. I have the numbers separated into groups of 16 on individually sheets for a total of 64 sheets. Obviously at some point the same number "43254" is going to generate on one of the sheets. Is there a way to search/highlight that number automatically upon generation? I've found that I can do conditional formatting to search for a specific cell, but not a range of cells. Like compare "A4-E4" to every set of five adjacent numbers in all the sheets, then highlight it. I have no idea if this is possible, but I'd appreciate it.
Select cells A4 through E4 and go to Format -> Conditional Formatting -> Manage. Apply style Good if Formula is:
CONCATENATE($A4;$B4;$C4;$D4;$E4)="43254"
So 43254 matches.
And 43253 does not match.
This is more complex than first appears. The following explanation may be difficult to understand if you do not have much experience with conditional formatting.
The formula gets evaluated 5 times, once for each of the cells.
Normally, rather than always indicating cell A4, Calc would interpret A4 as the currently evaluated cell (because we selected cells starting from A4). And B4 would indicate the cell to the right of the current cell that is evaulated. So for example, if such a conditional formatting formula were filled to cell D7, then A4 would actually indicate cell D7, and B4 would indicate cell E7.
However, our formula uses $A4 instead. The $ tells Calc that we always want column A even if the formatting is for column B or C et cetera.
One outcome of this is that the formula can be filled down or up but not left or right. If it is filled down one row for example, $A4 refers to column A but the current row, which would be cell A5.

Conditional formatting: automatically refer to the next cell?

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

How to add percentage to entire table in excel

I'm still new to the more advanced methods in excel, so my question seems a little bit simple, but I struggle with it a lot and can't find a solution. So let's say I have an entire table in excel with different prices in each cell. I want to update the whole table with a percent which can be changed from a different cell. For example if I want to increase the prices in all cells in the table by 10% I just type in that designated cell 10% and all the prices are increased with 10%. I tried t he method with Paste Special but I have to paste it again when I want to change the percentage. Any help will be greatly appreciated. Thank you for your time.
Let's say your percentage cell is in G2, and the Price Cells that you want to change are in cells a2, b2, and c2.
Say cells a2 price is 2, b2 price is 4, and c2 price is 7, the formula you'd want to put into the cells is =2*g2 for a2, =4*g2 for b2, and =7*g2 for c2. Now everytime you change the value of your percentage cell in g2, your cells will automatically update.
If a vba solution is acceptable, you could use the paste special method in the workbook_sheetchange event of ThisWorkbook and use the percentage cell as the target.
Without VBA, you could create a second table that references the original table and the percentage cell in a formula.

Excel measuring arithmetical average (counting blank cells)

I have a problem in Excel. I'm making a program to monitor the consumption of fuel per month. As I do not tank fuel every day, but only every couple days I'd like the program to measure aritchmetic mean for me.
This means it would take the last input and count all blank cells above (excluding my previous input) and measure the mean of fuel consumption in these days.
Example of how it should work:
[link to image] http://i64.tinypic.com/2dre87m.jpg
Edit: If anybody knows how to count number of empty cells between 2 inputs it would also suffice to me.
I was able to get your desired results using an array formula. Assuming your headings Day,Fuel, and Average are in cells A1, B1, and C1 respectively; copy and paste the following formula in cell C2 hit CTRL+SHIFT+ENTER and drag the formula down your column.
=IFERROR(IF(B2="","",(B2/(LARGE(IFERROR(MATCH($B$2:B2,$B$2:B2,0),""),1)-LARGE(IFERROR(MATCH($B$2:B2,$B$2:B2,0),""),2)))),B2)
It gave me a "formula omits adjacent cells" error, but we want to omit the cells below the target row on purpose, so just ignore the error. Hope this helps.
Try this formula:
=IF(B2="","",ABS(B2/(MATCH(0,B$2:B2,-1)-SUM(MATCH(0,B1:B$2,-1)))))
in C2 and copy down.
if cells in column B can contain string values then you can use this formula:
=IF(ISNUMBER(B2),ABS(B2/(MATCH(0,B$2:B2,-1)-SUM(MATCH(0,B1:B$2,-1)))),"")

Formula with dynamic variables in excel

I have an Inventory of boxes as an excel sheet with two columns(Total and Usage). The column on the right(total) has a value which shows the initial number of boxes. In the left column(usage) I give the number of boxes that I remove from the stock on a date. I want the right side column(Total) to be updated automatically.. Meaning if the total value at the start is 50 and I use 4 boxes then i want the cell in the total column at that row to show the new total
Example My total value is initially 50(B2) and i use 4 boxes(A3). I want B3 to show the new total... As i keep adding usage values in column A i want column B to be updated as (previous total - new usage) How to do this in excel? I dont want to type in the formula in each cell and i dont know if i can assign varaibles to cells. Is it possible?
I am assuming you want to use subsequent rows to record each withdrawal of some boxes? You need to enter the appropriate formula in each cell of the total column. So in B3, put =B2-A3. Then copy-paste that to all cells below in col B, Excel will paste a formula whose cell references are relative to the cell the formula is pasted to. Alternatively there is a mouse drag gesture that's even faster to fill a column with a formula.

Resources