Expand table (rows and col) in excel reference to another cell - excel

Is there a way to automatically add rows and columns based on a ref cell.
Example in a cell if the number is 8 I need to create a table 8*8
basically I am trying to find the solution to this question. Below is the table to add the values of two 6 sided dice. But now if I want to find 8 face dice is there a way to automatically do it in excel, without adding the col,row 7&8 then doing the calculation
table for the adding two 6 faced dice
Apologize if I am not clear but I can not find the answer for this. I am thinking about creating a Macro but is there a way to do it without that.
Thank you,

Assuming you started the table in A1, in B2 the formula should be =B$1+$A2. You can then copy the formula to as big as you need.

Related

Add text into cell formula in Excel to automatically select an other column with a drop down

This is quite an unsual question to fix my column problem from my Power Query mess.
I would like to add a text value to a selection name so it will dynamically select an other column name.
My goal is that my drop down would automatically do the following on every row from an other sheet:
=TableItems[#high]
=TableItems[#high.1]
=TableItems[#high.2]
What I want it to look like with dynamic drag formula
Anyone know if it is possible to add a value to a cell selection without having any errors?
I was able to offset my column by using a new column which I have called "Formula" and I just hide it.
This is the procedure I have done:
I took my TableItems selection and I have created a OFFSET formula of
=OFFSET(ItemInfo!D2,1,**4**,1,1)
The number 4 in my table moves 4 times to the right each times, so I have created a formula to multiply the number 4 by 2,3,4,5,6 etc.
The formula is the following:
=OFFSET(ItemInfo!D2,1,$H3,1,1)
=OFFSET(ItemInfo!D2,1,$H4,1,1) etc etc etc
IMAGE OF THE RESULT
I've had this problem for a couple of centuries, but I really hope this will help anyone else having a similar problem.

Excel Index & Match vertical and horizontal criteria for copying formula

I have been trying to populate the following table:
with order_amount from the following table:
I cannot crack the fact there is a second condition to be taken into account - column delivery_week.
Can somebody please help me out with a formula so it can be used across the weeks in table Final?
I have tried with Index+Match. The issue is, one condition is to be looked up horizontally (product_id) and second (Deliver_week) vertically
The end result is shown here:
I would appreciate any tips..
PS: The table structure has to stay as it is - shown tables are just necessary columns to solve the problem.
as stated in the comments use SUMIFS. Put this in C2:
=SUMIFS(OtherSheet!$C:$C,OtherSheet!$A:$A,$A2,OtherSheet!$B:$B,C$1)
And copy over and down.
In the order_amount table, try to create in D:D an assisting column which concatenates both columns A and B, i.e. (A2&B2).
Go into columns C2 in your target table and write something according the following:
(assuming order_amount is in worksheet - "sheet2")
=INDEX(Sheet2!$C:$C,MATCH($A2&C$1,Sheet2!$D:$D,0),0)
Pull this formula to the other rows and columns to populate them, the formula is fixed, thus don't worry for changes. To replace N/A with "0" use:
=IFERROR(INDEX(Sheet2!$C:$C,MATCH($A2&C$1,Sheet2!$D:$D,0),0),0)

calculating in excel based on criteria from different columns

I have been looking at different forums and I hope someone could help me here.
I want to conditionally format a cell based on certain criteria
The below would be a master table from which I will need to select data
and compute the values in this table
So, in the formula, I want to see how Phil's time is allocated across three Sprints. So, I will need to look at Sprint column in table 1 and search for Sprint 1, find Phil assigned to Sprint 1 and add the "estimate" total in table 2.
I saw something like this on the forum, but, no luck. I also tried using lookups and index and all I see are errors. If you have an easy way of solving for this, I would really appreciate.
You can use SUMIFS
The formula in B2 is:
=SUMIFS($I:$I,$J:$J,$A2,$G:$G,B$1)
This looks like a pretty basic sumifs.
=SUMIFS(Table1[estimate], Table1[sprint], H$2, Table1[assignee], $G3)
Don't drag the formula to fill the other cells. Copy and paste into the larger area. Dragging will shift the column references like relative cell addressing. Copying and pasting will treat the structured table references as absolute.

How to move rows in excel based on a formula

I tried to look at moving and selecting items in Excel in the documentation over here and here but it isn't helping at all, and I don't why my question isn't answered with Google.
Basically, suppose I filtered out what I need from the Spreadsheet. My C column has everything I need, but I need to move them. And the formula is very simple. I basically need to move C# All the filtered C's with the number, and move them to E#-1 2 columns to the right, and up 1.
But the issue is
* When I select C, it also selects the ones that I don't want
* I don't know what formula exists that can solve it

Find and Compare Two Columns Excel (With Screenshots)

I have a spreadsheet that will occasionally get new data that I don't know the contents of, I just have to add it to the spreadsheet. Some of the new data is just updating rows that are already in the spreadsheet, and other data is adding new rows. I'm looking for a way to add a column that will tell me if something has changed in the row when I compare the old spreadsheet to the new one.
The sheets have one column that will always have a unique value among all the rows, so I can use that to match rows if the sheets aren't sorted the same way. Here are some screenshots to show what I'm trying to do:
Old Spreadsheet:
New Spreadsheet:
The only solution I can think of is a large nested IF formula that compares each column one by one, something like:
=IF(Old!B2=New!B2,IF(Old!C2=New!C2,"NO","YES"),"YES")
The problem with that is that it gets very hard to look at since my actual data is using 33 columns (not including this "Changed?" column) and new columns could be added in the future.
I'm not very technical with Excel, nor have I ever used VBA, so I apologize in advance if there is a simple/obvious solution that I'm missing.
Thanks in advance for your help.
Using your example, in the 'New' sheet cell D2 and copied down:
=IF(COUNTIF(Old!A:A,A2)=0,"YES",IF(SUMPRODUCT(COUNTIF(INDEX(Old!A:AG,MATCH(A2,Old!A:A,0),0),LEFT(A2:AG2,254)&"*"))=SUMPRODUCT(COUNTIF(A2:AG2,LEFT(A2:AG2,254)&"*")),"NO","YES"))
vlookup would also work well for this problem.
in D2, the formula would be:
=IF(AND(VLOOKUP(A2,Old!A:C,2,FALSE)=B2,VLOOKUP(A2,Old!A:C,3,FALSE)=C2),"NO","YES")
The column numbers (2 and 3) are the columns that correspond to the data you are trying to match, using the ID column.
It's possible to find the appropriate column using MATCH if the column names you have match the column names in the old sheet
This would make the formula look more complex, but Excel would adjust the Old!A:C reference if more columns are inserted.
The formula would look like this to match against column names
=IF(AND(VLOOKUP(A2,Old!A:C,MATCH($B$1,Old!$1:$1,0),FALSE)=B2,VLOOKUP(A2,Old!A:C,MATCH($C$1,Old!$1:$1,0),FALSE)=C2),"NO","YES")
The difference between this and the last one is the use of MATCH($B$1,Old!$1:$1,0) to find the column (using $s to anchor the lookup values)
In this case, specialized software for Excel compare is better.
My company use this software. Check it out.
http://www.suntrap-systems.com/ExcelDiff/
http://www.youtube.com/watch?v=QQgnWr_RT-8

Resources