Sorting Data In Dynamic Ranges
Feb 6, 2014
In the attached workbook I have hard-pasted data in columns A:M that's designated as an Excel Table to make it dynamic.
In the adjacent columns O:AA I have formulae to extract data from A:M based on the "Frequency" stipulated in cell AD1,
I would like to be able easily to sort the data in the variable sized range in columns O to AA in descending order of the calculated values in column Z.
Best way to do this so that the formula don't get jumbled up or the blank cells in column Z end up at the top of the sorted data?
View 2 Replies
ADVERTISEMENT
Apr 15, 2014
have data in the attached file arranged as follows:
"Source Data" sheet Data in columns A to L will be updated daily by pasting from another workbook. On any given day the data in columns A to L may have more or fewer rows than the day before.
"Lookup Table" sheet The aim is to return the data from the "Source Data" sheet; the selection depends on the Data Validation choice in cell O1.
I would like to be able to sort this dynamic list of data - ideally by clicking a single button - in descending order of the values in column L.
View 6 Replies
View Related
Jun 8, 2014
I currently have two tables in one worksheet showing the sales of different region.
The problem is, when I sort the data (I can't used the named ranges as it should exclude the first row which is the header), is there a way I can make it dynamic too??
** The Europe table is from A1:G5 where Row 1 is the Header and Row 5 is the Total
Code:
With ThisWorkbook.Worksheets("Sheet1").Sort
.SortFields.Clear
.SortFields.Add Key:= _
Range("G2:G4"), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption _
:=xlSortNormal
.SortFields.Add Key:= _
Range("F2:F4"), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption _
[Code] ........
View 3 Replies
View Related
Jun 8, 2014
I currently have two tables in one worksheet showing the sales of different region.
The problem is, when I sort the data in the table (I can't used the named ranges as it should exclude the first row which is the header), is there a way I can make it dynamic too??
**Attached, please find the example spreadsheet, I have only written the code for the first table.
View 3 Replies
View Related
May 19, 2009
I have a blank template spreadsheet that is copied every time I need to work on some data exports from another system (the data needs to be kept, hence the copying of the original blank template first).
I have set up conditional formatting using;
=MATCH($A1,range,0)
This formula is always in the entire column of row A in Worksheet1 (for the sake of argument)
Problem is in Worksheet2 where the range it's using to compare is always a different number of rows deep...it can be 70, it can be 2000. I always call the range 'interest'.
Is there anyway (in the blank template) of setting column A as a dynamic range called 'interest' so that after data import it automatically sets the range at the desired size?
View 2 Replies
View Related
Feb 4, 2010
I am using OFFSET to make dynamic named ranges- the only problem is that I'm having trouble using it with linked data-
The Situation:
-Cells A1:H500 are linked to another sheet, with each cell containing a formula like =IF(ISBLANK('C:...[workbook.xlsx]worksheet'!A1),"",'C:...[workbook.xlsx]worksheet'!A1)
-Currently only cells A1:H100 have data, but this is dynamic and will change
-I want a named range that will only select the cells with data in them...the problem is that COUNTA counts the link formula even if the cell is "blank" (because it isn't blank).
-I hate hard-coding ranges...the solution for the named range =OFFSET($A$1,0,0,500-countblank($A$1:$A$500),8) is ugly!
Any solution to making dynamic named ranges with linked data that may or may not be "" ?
View 1 Replies
View Related
Aug 7, 2014
I am unable to use dependent data validation lists using the INDIRECT function when the initial named range is a dynamic one.
See attached.
The named ranges 'Men','Women','Children' are all dynamic based on number of entries in each column order to accommodate a growing list, whilst also not having blanks in the dropdown (hence I haven't used entire column ranges). The named range 'test' is a static one.
Column H has a dependent data validation based on entry in Col G. This works for the static list, but not the dynamic one!
View 4 Replies
View Related
Oct 1, 2009
I'm working on trying to maintain an inventory management sheet where i basically enter all the spare parts issued to vehicles. Now there are more than 700 parts dat form the components of a vehicle, so i decided to split this list into 12 spare groups(Gear, Engine, Body, Axle, etc etc..) and then based on wotever spare group being selected my sheet wud pull dat specific spare group list.
Since i've worked with indirect function before i thought this was a piece of cake!
However when i actually sat working on getting my sheet together i realised its not gonna be dat easy! Basically my spare group lists are a work in progress and so new items would/may be added to these lists as we start working on this sheet. So i decided to make them dynamic by using the offset function. But list validation fails when i use Indirect function on dynamic ranges!
View 2 Replies
View Related
Sep 25, 2009
I can use a dynamic named range and a direct reference to the name and the DV works.
I can use a standard named range (not dynamic) and an INDIRECT() reference to a cell with the name of the range in it and the DV works.
But if I try to use a dynamic named range and an indirect reference to a cell with the name of the range in it, the DV fails.
Any workarounds out there? This project includes a LOT of DV lists, getting them to self-maintain is important if I can do it.
View 12 Replies
View Related
Apr 22, 2013
A lot of the Workbooks that I design for use by myself and colleagues require data to be copied in from external data sources. To avoid named ranges from failing, I always use the following method:
Calculate the length of the data set:
Code:
=COUNTA(INDIRECT("'Data Sheet'!"&"$A:$A"))
(There will be no gaps in the data, hence a count is fine.) This named range is called DSROWCOUNT.
Example named range for the data in column A:
Code:
=OFFSET(INDIRECT("'Data Sheet'!"&"$A$1"),1,0,DSROWCOUNT-1,1)
I use INDIRECT to ensure my named ranges do not fail if the data is deleted (accidentally or intentionally), as #REF! errors will occur.
The problem with this method is that it automatically makes the Workbooks volatile because of the use of OFFSET and INDIRECT, hence the Workbooks always needs to be in manual calculation mode to be usable.
View 7 Replies
View Related
Jul 6, 2006
loop that can calculate the median of dynamic ranges. I need to run through all columns and for each column find the the ranges (there are more ranges and they are seperated with a blank row) with numerical data and then calculate the median and thereafter continue down to find the next range with numerical data in that row and so on.
View 4 Replies
View Related
Dec 22, 2009
I have a range which will change in size & in content, & I want this to be a Named Range at whatever size it is.
Reason I want to is because I want to make a Validation List with this dynamic range. I also want a Validation list which lists the content of 2 or more dynamic ranges which may or may not be on the same worksheet - is this possible?
i.e.
First dynamic range: called "Milestones" at A11
Second dynamic range: called "Activities" at A25
& make a Validation list that will list content of both
View 9 Replies
View Related
Jun 21, 2009
I would like to replace the blue bit of this Dynamic Named Range (DNR) with an INDIRECT formula in order to modify the starting point for the DNR: =OFFSET(DATA!$C$60,0,0,20,1). Unfortunately, I can’t seem to get my INDIRECT formula to work in order to use it to replace the blue bit above: INDIRECT("'"DATA"'!&ADDRESS(MATCH('SHEET1'!AC8,DATA_Date,0)+22,3)"). The orange bit of the formula above returns a value of 60, therefore the ADDRESS formula should return $C$60, that can then feed into the INDIRECT and act as the equivalent of DATA!$C$60. But it doesn’t.
View 2 Replies
View Related
Feb 26, 2010
definitions for static ranges and dynamic ranges?
View 9 Replies
View Related
Jun 3, 2008
I have a table setup in sheet1 and I want the user to be able to choose how this data is sorted. Ie based on a number of column headings.
I have a validation list that lets the user pick on of the following options:
Club
Seasons
Pld
W
D
L
GF
GA
GD
Pts
Titles Won
Runners-up
The answer is given in sheet2 cell C3
What I want is some code that will sort the range B10:N51 by the column heading result given above.
View 9 Replies
View Related
Aug 11, 2009
i have a table with 4 columns: (customer name, revenue, expenses, profit)
in cell A1, i can select from either of the above headings and what i wanted to do is sort the mentioned table based on the heading that's selected in A1.
for example, if i select Customer name in A1, then the table in (B2:E12) is going to be sorted by customer names (alphabetical)....or if i select Revenue in A1, then the table will be sorted by revenue values...etc.
View 9 Replies
View Related
Mar 23, 2009
I have a spreadsheet that I have developed at work to track sales related data. As part of the reporting for this data, it is sorted by date. I have been asked to capture some additional related data and due to the structure of the spreadsheet(that has been in use several months with no issues) I can not put the additional data in adjacent columns without doing a complete redesign of the format.
I can place the data several columns away.... The data "in the middle" is static and is used for other calculations and should not be sorted. Is there a way to sort both ranges of data WITHOUT disturbing the columns separating them and keep the proper relationship with the data?
See attached for a very simple example. In this data set the "original" data was in range A2:E11 the "New" data is in Range I2:M11. It would make life simple if I could do something like this (but it sorts everything in between)
View 2 Replies
View Related
Jul 10, 2009
Is it possible to have dynamic sorting in a table?
What I am after is a scoreboard type effect where as results are entered, the teams are sorted automatically, rather than entering all of the details and then doing a sort afterwards.
I have attached a table where I would like the sorting of columns B - E done in the following order (All decreasing order):
Comp Points first
then by Sets %
then by Points %
I am drawing this info from another table. Will this have an effect on if it can be sorted dynamically? Hoping that as i enter a result in the other table, it will bring across the current comp points, set % and points %, and then sort the table into the rankings all at once.
View 10 Replies
View Related
Feb 20, 2013
I am trying to doctor a recorded sort macro to adapt to a changing range.
With the code below I get:
RunTime error 1004
Application-DEfined or Object-Defined error
I have tried with no luck:
Key:=dat
.SetRange dat
Key:=Range("A1").Resize(rw, clm)
.SetRange Range("A1").Resize(rw, clm)
Key:=Range("dat")
.SetRange Range("dat")
Key:=Range(dat)
.SetRange Range(dat)
[code]....
View 1 Replies
View Related
Feb 27, 2014
Here is my code.
Currently I get a 1004 error. "Method of Range of Object _Global Failed" on "Range(Selection).Sort.SortFields.Clear"
Code:
Sub sortBacklog()
Dim appExcel As Excel.Application
Dim myWorkbook As Excel.Workbook
Dim myWorkSheet As Worksheet
Set appExcel = CreateObject("Excel.Application")
Set myWorkbook = appExcel.Workbooks.Open("C:Backlog.xls")
Set myWorkSheet = myWorkbook.Sheets(1)
[code]....
View 1 Replies
View Related
Sep 2, 2006
I am attempting with a simple spreadsheet he can use on the golf course on a Treo (so no macros I believe can be used). I am want him to be able put the order next to a list of people's names (the same 8 play) and then a dynamic sort will take place listing who goes first. Everything works great except it one or more people do not play then the sort lists them as "N/A". Instead of "N/A" I want it to show up as a blank.
View 2 Replies
View Related
May 11, 2007
I regularly get a sheet that contains about 20 columns. I need to delete about 14 of them, and re-order the columns to a fixed order.
The columns always have the same headers, but are ofter in different positions (so I cannot hardcode the column location).
I have tried using the following, but fail on trying to use the result of the find in the selection afterwards.
I also do not know how to loop this through a list of column names (as I said, the input always has the same column names, and I always have to delete the same columns, and sort the remaining).
Sub Sort_My_Columns()
Cells.Find(What:="name1", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
myRow = ActiveCell.Row
MyCol = ActiveCell.Column
Columns("myRow:myRow").Select
Selection.Cut
Columns("A:A").Select
Selection.Insert Shift:=xlToRight
Range("A1").Select
End Sub
View 9 Replies
View Related
Oct 9, 2009
I am wanting to display cricket bowling figures - the best figures for each player as the season progresses.
I track runs and wickets each week like this:
Runs 23 25 18 35
Wickets 1 3 2 3
Sorry can't post attachments. Top row is A1:E1. Bottom row is A2:B2.
This shows the bowling figures for 4 weeks.
I need to sort the Wickets range and find the highest number. When there are two or more cells returned with the same value (as there are here (3)), we then need to find the lowest value in the runs range for these two matches.
The result needs to be displayed as follows:
(number of wickets hyphen number of runs)
In this example 3 wickets was found twice. 25 runs were conceded one week and 35 runs another. So the result needs to be: 3-25
When there is only one cell with the highest number of wickets, the number of runs for that week is chosen without any need to check anything else.
e.g.
Runs 23 34 20
Wickets 1 3 2
would return: 3-34
View 9 Replies
View Related
Oct 28, 2008
I want to create dependent lists using data validation. The lists need to be created from ranges that will be growing as users add more data. I think the best way to create the list is a VLOOKUP. However, I am not sure how to use the VLOOKUP when the range is changing.
I have attached an example. I have a list on sheet "Vlookup" called "FRUIT" with "apple", "orange", "banana". Then to make the depedent lists I have created three other lists called: "APPLE", "ORANGE", "BANANA". I want to pull the COST from sheet "VALUES" into the lists "APPLE", "ORANGE", "BANANA". Users will be adding costs next to the FRUIT they purchase.
View 5 Replies
View Related
Nov 18, 2009
I have a particular issue - i am trying to create a rolling correlation.
lets say you have two variables for 3 different months:
Month1 a x
Month2 b y
Month3 c z
correlation will correlate a-c with t-v
however, come next month - i have to manually drag the ranges for a rolling three month correlation:
Month1 a t
Month2 b u
Month3 c v
Month4 d w
correlation will now correlate b-d with u-w for a the last three months.
I want to automate this as I know what the month is, I can't seem to return the last three months and correlate the data.
I have tried to do this with the database functions, but I think that they break the array relationship of b-d and u-w in the correlation function.
View 9 Replies
View Related
Jan 20, 2007
In the example I have attached, I need 4 named, dynamic ranges to build a chart with:
1) Dates for the chart
always starting from A2 ... to whenever the LAST sum of B, C, D =0
(right now that would be A2:A30)
2) The Amounts
I need the amounts as 3 individual dynamic ranges, with no 0 values
(example - B2:B21, or c10:c14, etc)
3)The date column
same as #2, but just a single cell reference to show as a marker on the chart.
(example e21:e21)
I know someone here will think 'so what's the big deal' and pop it out in 30 seconds.
View 10 Replies
View Related
Oct 6, 2008
I'm trying to make ranges in a SumProduct formula dynamic, but getting errors #N/A. I think this is because the top two rows are headers, throwing off the range count.
Q. How do I adjust the range definition to compensate., e.g.
Range =Offset(Sheet1!$D$3,0,0,COUNT(Sheet1!$D:$D),1) where column D is numeric, and
Range = Offset(Sheet1!$T$3,0,0,Match("*",Sheet1!$T:$T,-1),1) where column T is text?
I had assumed that the offset value 3 would do this, but I suspect the functions count and match are not doing so.
View 8 Replies
View Related
Feb 24, 2012
I am trying to create a vlookup to get a count of trouble tickets techs completed daily within a table I created, I am using a table since its dynamic. For example I need to see how many tickets Joe completed in a day. See below...
Tech Ticket# Comments Status
Joe 1234 Replaced HD Closed
John 3212 Replace Motherboard Closed
Joe 5678 Installed OS Closed
Above is just an example (my table has 40 columns). I need to vlookup joe and get the count of the closed tickets.
View 6 Replies
View Related
Mar 25, 2014
So I was looking for reassurance or validation more than anything. From what I can tell you can in order to build a chart that is dynamic throughout a range, you use the offset and count or counta function - 1. That part isn't a problem. My question is once you created that for your charts do you just normally plot your chart range or do you have to reference the named range directly into the chart range?
View 2 Replies
View Related
May 21, 2014
I have monthly sales, and i wanna be able to sum the last-twelve month sales, when i select the month from a drop-down list. For example, when i select Feb14 from the drop-down, I want the formula to sum the sales between mar13-feb14. how can i accomplish that?
Select Month
Feb14
LTM Sales
?
[Code] ..........
View 7 Replies
View Related