I have a workbook which I insert a column in the Column H field on a daily basis. The data inserted is for records of the previous day.
I know by defining a formula in "Name Manager" I can add more columns and my formula will be static.
Example: I sum all data points for the month.
Formula_1 = " =SUM('Sheet 1'!H$6:$AK$6) "
When I add a new column in Column H then my formula includes this newly created column and shifts the second part of the reference to
$A$L6.
I have a Sparkline to show trends of my data. Every time I enter a new column I have to reconfigure the Sparkline "Data Range" to include my new column in the Column H field.
Is there a way I can have my Sparkline include my newly created column and shift my formula one cell to the right?
Yes. By putting your data in a table it automatically recalculates and readjusts whenever you add or remove a column or row.
As a table your data looks like this:
Then when I add a column and insert numbers, the sum column moves to E column and the function becomes =SUM(A2:D2)
Hope this helps.
Related
I am making a table of averages based on a large table in another sheet.
The original table has 27 samples each with 3 repetitions of "sample name" in column D along with 3 repetitions of "data" in column H through O
ex: Cells D4-6 "22L9" Cells H4-6 "0.21","0.32","0.23"
D7-9 "22p3" H7-9 "0.11","0.42","0.43"
The new table I want to auto-populate column A in the new sheet the first rep. of "sample name" from the original table, in column B an average of the three "data numbers" from H, column C from I, and so forth.
I have tried =AVERAGE('Sample data A'!H4,OFFSET('Sample data A'!H4,3,0))& =AVERAGE('Sample data A'!H7,OFFSET('Sample data A'!H7,3,0)) and filling down but it does not skip cells in the next formulas
I think I understand what you’re trying to do. Even if I haven’t nailed it, I hope this approach gets you started.
Instead of doing the selecting yourself using OFFSET(), let Excel do it for you by using AVERAGEIF(). AVERAGEIF() says “average only those values from column B in rows where column A matches some value.
Let’s say you enter “22L9” in cell A2, “22p3” in cell A3, etc.
Then in cell B2:
=AVERAGEIF(‘Sample data A’!$A$2:$A$50, A2, ‘Sample data A’!$H$2:$H$50)
And then copy that down for how ever many column A values you have. In my formula, I used A2:A50 and H2:H50, I leave it to you to make those ranges match whatever rows contain your data.
Let's say I have a table of First/Last names and Salaries.I want to compute, for every last name, the sum of the salaries of people with that name.
I know how to do that for each name individually using SUMIF, but I was wondering if there is a quick function to produce a table of Last names and Salary sums?
Another option would be using a pivot table.
On the insert tab, select pivot table
Use your existing table as the data
In the fields select the Last Name and Salary columns
Let's support you have the salary sheet in sheet1 as below,
copy column last name value to sheet2.column A, remove duplicate, add a new column as Salary Sum in column B, input a formula as =SUMIF(Sheet1!B:B,Sheet2!A2,Sheet1!C:C) and drop down to all rows, then you can got a salary sum table as below,
of course, if the first name/last name is dynamic and unexpected, it would doesn't work. you can drop a button and bind a VBA code to handle it.
You could use this ARRAY FORMULA: CTRL + SHIFT + ENTER
=IFERROR(INDEX($A$2:$A$7,MATCH(0,COUNTIF($D$1:D1,$A$2:$A$7),0)),"")
For summing up the corresponding values just use
=SUMIFS($B$2:$B$7,$A$2:$A$7,D2)
I'm trying to build report from external workbooks on servers. Can't use Pivot, it takes too long to load data and refresh.
I have plain table with data, and need to create Matrix type table, where Column B stays as Col B values, and Col C ++, goes to be headers (in row) and data filtered by date in B2. Then count duplicates from data table that match col headers and Col B rows, and put result in cell. And count SUM.
New to VBA, don`t know how to aproach that. Newbie in simple formulas and formatings.
Hope someone can help.
product data:
result:
You can use a single COUNTIFS() to complete the results table.
In the first sheet, I have named the ranges appropriately (see the grey text at the end, that's what I named that range):
Then, in the results sheet, simply copy "ordered"/"Undelivered" down, then starting in D5, place this formula and fill in your table:
=IF(COUNTIFS(date,$B$1,orders,$B5,transport,$C5,product,D$3)=0,"",COUNTIFS(date,$B$1,orders,$B5,transport,$C5,product,D$3))
(the red highlighted area is where the formula is filled in). And of course, if you don't want to see the repeated "ordered"/"undelivered", simply set the font to white.
I use excel 2007
i made a table with few columns but too many rows. Each row contains some data and simple formulas.Now I want to duplicate a specific row based on current date [TODAY()] at top of the sheet.I mean whenever I open the file,the right row according to computer date,be shown directly at somewhere else instead of looking through all rows to find it.
thanks
above your table. add an empty row.
First column add =TODAY() // This will show todays date in the column and can be used in your other formulas. We will assume the cell is A1
Second Column add = VLOOKUP($A$1,A2:D8,2,FALSE) A1 being the date, A2:D8 being the table range (A2 top left cell, D8 bottom right cell), 2 is the second column of your table range, false returns the value in the second column as longs as the date (A1) matches the date in the first column on your table range.
Copy the formaula across the columns, changing the lookup column in the formula. ie. Third column VLOOKUP($A$1,A2:D8,3,FALSE)
Glad to help.
I have a data table with 8 columns and i want to know if anyone can help me come up with a formula to get the name in the first column if i enter a value into the columns (3,4,5,6,7,8).
I want the name from the first column to appear in another table on another sheet where only names appear where data is in the columns (3,4,5,6,7 & 8)
Try this:
=IF(OR(Sheet1!C2<>"";Sheet1!D2<>"";Sheet1!E2<>"";Sheet1!F2<>"";Sheet1!G2<>"";Sheet1!H2<>"");Sheet1!A2;"")
You can use C1 = 1 .... if you prefer.
And C1,D1,E1... have to be replaced with your columns.
Also Sheet1 have to replaced with your sheet name
I would use a Pivot tables.
First create a new column in the existing table:
If you only having positive values then it is:
=sum(C2:H2)
If you have zero and negative values as well it would be like this:
=IF(COUNTBLANK(C2:H2)=6;0;1)
Then make a pivot table with the "TO/TA name" in the Row Labels and the new column in Report filter - where you then removes the "0".