Duplicate named range based off of cell value - excel

I am working on updating an Excel spreadsheet for my supervisor and I want to find a way to get a named range from another sheet depending on the day of the week (each named range has the name of a weekday) but I haven't found a way to do this.
So I need the staff list to be duplicated under the weekday heading based on the heading. Any help appreciated, I don't have a huge deal of experience with Excel or VBA.

I'm not quite sure if I understood what you are looking for! If your Excel version has Dynamic Array Formulas then you can try this:

Related

How to automatically populate column values into another sheet in Excel?

I have certain columns in sheet one of an excel file that looks like this.
The player No and the Player has been manually created while the Sold to column has been selected using data validation (list).
Right now the sheet two of the excel file looks like this.
Now the question is how do I automatically populate the values of Player No and Player into the respective team(s)?
Expected output is as follows :-
I am currently using Excel version 2013. Can you suggest whether I should use any formula or Macros to achieve this ? Many thanks in advance.
You need to filter data based on condition. There are many way to do that. One of approch is as following.
As per below screenshot use below formula
=IFERROR(INDEX($A$2:$A$7,AGGREGATE(15,6,(ROW($A$2:$A$7)-ROW($A$1))/($C$2:$C$7=$F$1),ROW(1:1))),"")
You have to adjust the formula for other team. For Sheet 2 just you need to refer Sheet 1 in formula like
=IFERROR(INDEX(Sheet1!$A$2:$A$7,AGGREGATE(15,6,(ROW(Sheet1!$A$2:$A$7)-ROW(Sheet1!$A$1))/(Sheet1!$C$2:$C$7=$F$1),ROW(1:1))),"")

How to use a table reference as a variable in Excel

I been doing a sheet to resume my statistics for every month, and i got a problem with the table that was supposed to import the values of each day of a month in the table varying for the month that is "selected".
I got 12 sheets that each one has 31 days to complete manually. The resume needs to catch the info for each day on the specified table.
So i got the tables in every sheet defined with janWeight, fevWeight, marWeight And goes on. In the resume i have a table that verify the Insert in a specific cell that define the month that i am looking for.
I need a formula that can do the reference to the specified table. Like if the cell for the month is "3" i'am looking for the table marWeight, and them i can do the import of all the information.
I really can pass thru this problem importing every single value of the sheets by copying them using =COUNTIF() but this would generate a table with 2,232‬ cells, and that's not worth at all.
Thanks.
There's a lot of vba codes that work alongside of objects such as tables. Since they're named I'll give some basic calls, but you can read more about Table and VBA here This source has helped me teach myself VBA and I found it very helpful.
You can change the sheet from Activesheet to a specific one if it better suits your code.
Table = ActiveSheet.ListObjects("janWeight").ListColumns("Column 1").Index Would be how you reference the column named "Column 1" in your data for example. It works from the name, but you can change this as well to be the actual column number rather than a name. Just make sure to declare variables correctly as well.

How do I transpose a list of data over a range of dates to individual dates in Excel VBA?

Example SSheet
Hello, I have a data analysis problem i'm not sure how to tackle, please see example google sheet. I have a list of data for the cost of products over a date range; The date range is specified by a start and end date column. I need to write a macro which identifies the cost of a specific product for each day in the date range, and match it to a unique product list by day (sheet2). I honestly don't know where to start as my knowledge of VBA is limited, but i do have some familiarity with the language. Would anyone be able to help me figure out a way to tackle this problem? I already have a macro which generates Sheet2, I just need a way to populate it with the information from sheet1. Any help would be enormously appreciated.

Return a value relative to every instance of a search term

I have a spread sheet populated with dates (Months) and revenue figures. The sheet is structured with numerous tables all containing these month-revenue pairings but they are not all in the same columns.
I need to be able to search the whole range of cells for a given month and then each time the month is found I need to look across for the revenue figure (5 cells to the right) and return the answer.
The answer returned needs to give the total figure for all instances of the search term.
VLookup won't work because there are multiple tables and they are not all lined up.
Any advice would be very gratefully received.
Thanks
You should use a VBA script for that, IMHO this is not possible to do in a formula. Here is a rough outline what you need to do:
Define an array of the month names as they appear in you sheet
Iterate this array and for each month name find all cells containing it (this might help)
Iterate all cells of each month and do your calculation based on this cell (find a cell with a certain offset or whatever)
If you cen provide a more specific description of your problem (preferably with example data/images), maybe we can give you a more specific answer.

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