Selecting A Group In A Moving Range

Nov 3, 2008

I have a spreadsheet where I need to perform a calculation on the lowest 10 of the 20 most recent entries. Currently I am just deleting the oldest entry and putting in the new data but I now desire to keep all my data.

How do I select the new range of 20 rows and then tell it to take the 10 lowest values to perform the calculation

View 11 Replies


ADVERTISEMENT

Selecting Group Name For Shapes

Mar 5, 2007

is there a way to select the group of the shape instead of a single shape i've tried .onAction and Application.Caller to do this ..but this is giving me the single shape that i clicked on instead of the whole group.'

View 9 Replies View Related

Selecting Subgroup Based On Specific Group

Aug 25, 2009

I have a Lookup table with a Group and Subgroup field. I have created a range for the Group and also for the Subgroup. On my main page, I have created a list option which allows the user to select the items under Group (Day, Colour and Time).

What I want next to do is based on the primary selection for Group; I want it to filter it on the specific Subgroup. For Example,

The User selects Colour from Group, the Subgroup will subsequently only show the appropriate selection which is Green, White and Yellow, and no further selection.

View 4 Replies View Related

Copy/Paste Range(s) Without Activating/selecting Range(s)

Oct 2, 2008

To initialize some cells/ranges, I am copying a given range and pasting it to another given range using the. Copy and .PaseSpecial methods. However, it would seem that both methods actually select the range(s) for the operations, i.e. the given ranges(s) are activated/selected thus changing the focus on the spreadsheet. I would like to perform both operations without actually selecting the given ranges.

View 5 Replies View Related

Subscript Out Of Range When Selecting Range In Closed Worksheet

Apr 28, 2006

I am receiving a 'subscript out of range' error on the lines of code below.

I would note that all variables are declared and all seem meaningful as regards what you would expect at that point.

Below is a snippet from the immediate window which indicates what the values are:
completecashname C:CashDevelopmentMyFolderoutputCASH042706.xls
cashsheetname Formatted Sheet
cashcurrcolumn A
cashfirstrow 2
cashlastrow 876

Also the workbooks are both closed at this point (but it makes no difference)

Set CashCopy = Workbooks(CompleteCashName).Sheets(CashSheetName). _
Range(CashCurrColumn & Cashfirstrow & ":K" & Cashlastrow).Value
Set PelPaste = Workbooks(completepelname).Sheets(PELSheetName). _
Range((PELCurrColumn & PELlastrow)).Value

View 8 Replies View Related

Selecting A Range Based On Date Within That Range

Sep 26, 2007

What i'm trying to do is select a range based on the date which happens to be in the first column of the range.

For example, I have a column (A) that contains dates and column (B) that contains names.

Its easy enough to select the entire range using

Range("A1:B4").Select

I need someting that will analyse column A and conditionally selct the range based on the date in column A (ie. it will only select the rows where column A has todays date).

View 9 Replies View Related

Moving A Range....

Apr 30, 2009

Is there a way to write VBA code that can reference a range of data that may be moved on the spreadsheet by the User? For example, if I write VBA code to reference a range of data such as:

View 2 Replies View Related

Moving Range In SUMIF

Jul 5, 2012

At the moment I have the below formula that retrieves a value from a separate sheet (the INDIRECT part of the formula determines the sheet to be looked at, as there are numerous and they are dependent upon what is displayed in two drop down lists in cells B3 & E3).

The problem is that the ranges F6:F30000, AJ6:AJ30000 and AA6:AA30000 are not always consistently in the same column position each and every time I receive a refresh of the report. The column headings, however, are always in the same row. Obviously I don't want to have to manually update the formula every time I receive a refresh of the report, so any way that I can get the aforementioned ranges to become more dynamic, so that the correct value will be retrieved each time? I am thinking something like an INDEX/MATCH combo but I am struggling to apply that idea to the 'SUM RANGE' section of the SUMIF function. This is the formula I have so far:

=SUMIF(INDIRECT("'"&$B$3&"'!F6:F30000"),$E$3,INDIRECT("'"&$B$3&"'!AJ6:AJ30000"))
/SUMIF(INDIRECT("'"&$B$3&"'!F6:F30000"),$E$3,INDIRECT("'"&$B$3&"'!AA6:AA30000"))

View 4 Replies View Related

Sum Contents Of A Row Within A Moving Range

Nov 1, 2007

I have Cloumn A with names of staff going down a2, a3, a4 etc

In Row 1 I have dates running from left to right

Within the table itself I insert a 1 when an agent is late for their shift

How do I get cloumn B to look across the top of row 1 and count 4 weeks before Todays date and use that as its range.

I'm sorry I can't post the sheet from work PC - No Colo on here

View 9 Replies View Related

Group A Range Of Numbers?

Feb 27, 2012

i have a range of numbers, 800 000 from 2 600 000 but i need to get them into numerical order packs, so i might end up with 100's of packs due to the ranges of numbers.

View 4 Replies View Related

Conditional Formatting With A Moving Range

Jan 17, 2010

I have a Conditional Formatting query where in essence I am needing to ‘make invisible’ a range of data by changing the font and background fill to white (and at the same time nullifying the effects of a number of other Conditional Formats). On the surface, this seems an easy thing to achieve, but the problem is, the range I need to apply this CF is a moving range and is dependant on a user changeable date.

Description of worksheet:

The sheet is managing shifts worked over 1 year by 21 people. The top 33 rows are a frozen (and collapsing) display area below which is a matrix of 365 days down and 21 people across. The TODAY button uses a macro to scan the dates and display todays entry directly beneath the freeze line of row 33. The date in M28 can be entered manually and after hitting enter, that dates data is now displayed under the freeze line. Also, using the spin button will increment or decrement the date in M28 moving the entire matrix up or down.

My query..........

What I’m hoping to achieve, is to display ONLY the data selected by the date in M28 (ie that shown under the freeze line, and for all remaining rows to be ‘whited out’, but as the user increments/decrements M28, then the “whiteout” range also needs to increment/decrement. I have whited out a second worksheet “example” as if I had selected 18 Jan (this sheet will not move as there are no buttons, but the data is still there under the whiteout).

I hope this is not TOO unclear, but I would be grateful if anyone could suggest a solution or even tell me if this is not possible – or indeed any other way of achieving the same result ( I had thought of hiding the rows below the freeze line, but the freeze/unfreeze operation would probably be too jerky.

View 9 Replies View Related

Dynamic Range - Moving With A Macro

May 18, 2006

I am not sure if my problem is in the dynamic range or not. I have attached a small sample file. I tried to create a dynamic range by creating a named range of my "LabelRow" with the following as the refers to: =OFFSET($C$32,0,1,0, COUNTA($32:$32))

When I set my cursor on this, Excel makes an outline on the whole row 32 where there is data, which gives me some clue that it understands what I am trying to define. Next, I try to pick this range up and paste it using named ranges in a macro (CopyRange). It gives me an error like it doesn't understand the named range. I do similar macro code in many other places in this project and it works with non-dynamic ranges. Here are some other details on this project. I need a dynamic range because I insert new data into the dataset, which may be 2 quarters up to 20 quarters. This insert causes a regular range to be messed up. My ultimate goal is to graph selected rows of data with the same labels, but I need to have it starting at Q1, which is pushed to the right as new rows are added.

View 2 Replies View Related

Reference Moving Range In Macro

Sep 4, 2007

I want to search a word in my Data sheet and want to know what is the column position. Example: I have a word "LastName" as a Column header in my Datasheet whose column position can be anywhere in the datasheet based on the table selected. So i want to write a generic code which give me COLUMN position for this word in the datasheet.

So if "LASTNAME" header is coming as 7th column it return me 7
if "LASTNAME" header is coming as 9th column it return me 9.

View 5 Replies View Related

Average Of Each Group In 2 Column Range

Nov 21, 2007

I just want to say If Column B = "Team A" then add up Column A (where the individual's percentage score is) and then divide by the number of matches found (this last part is the main part I'm struggling with). I've got a column that has the team name for each row as well, what's the formula word for doing this, I though vlookup, but I may be barking up the wrong tree.

View 3 Replies View Related

Selecting From One Set Range To Another

Jul 11, 2014

So in my code I have two set ranges and want to select from one set range to another. The code I have now does not work because I cannot select Range("POBRF:PO"). This is the code.

[CODE]
ARow = Range("A" & Rows.Count).End(xlUp).Row
Set POBRF = Range("A1:A" & ARow)
BRow = Range("I" & Rows.Count).End(xlUp).Row
Set PO = Range("I1:I" & BRow)
Range("POBRF:PO").Select
[CODE/]

View 1 Replies View Related

Selecting A Range Using VBA

May 28, 2009

I am having trouble selecting a range in my data to copy to another worksheet. I have declared two variables (startcell and endcell), as seen below, as strings:

Cells.Find(What:=startdate, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate

startcell = ActiveCell.Address

Cells.Find(What:=enddate, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate

endcell = ActiveCell.Address

After this I would like VBA to copy all the variables in a range that is bounded by startcell and endcell. Here is what my code is currently for selecting the range:

Range("A2:" & endcell).Select

Instead of A2, I would like to select startcell, but I cannot figure out how. Currently I can get VBA to recognise endcell. For example, using the formula above I can copy the range from A2 to endcell. However, when I try and use startcell as the beginning of the range (in place of A2) the code does not work.

View 9 Replies View Related

Selecting A Certain Range That Changes

Jan 17, 2007

I have two tables in two different worksheets. In the first table, rows get deleted if the value in column 'S' (the first row to the right of the table) is not '1', and columns get deleted if the value in row '2' (third row above the table) is not '1'. In the second table, the number of columns stays always the same but rows get deleted if the value in column 'N' (first column to the right of the table) is not '1'.

After the rows and columns are deleted the tables get pasted in a ppt presentation.
Now the problem: I am a beginner in VBA and up til now I am only able to define a certain Range, e.g. ("A5:M17"), to be copied and pasted into ppt. But since the tables will sometimes be bigger than other times depending if rows/columns are deleted, I would rather define a dynamic Range. The top left cell of both tabels to be copied is always 'A5' but the bottom right cell changes.

View 2 Replies View Related

Moving And Deleting Entire Rows Between Tabs In Workbook And Moving Them Back If Needed

Sep 23, 2013

I have an excel work book with 6 tabs. I would like to have Excel move an entire row from one tab to another tab (removing the row and inserting it in the other tab). I.e. Example I have a tab with items that are marked as "Open Actions" so if I were to change the drop down to close. Excel would move that entire row of actions to the tab with the "closed actions" and insert into the next available row. Now if someone were to come back at a later date say no it should be reopened than I would change the drop down to open and excel would move that row back to the open actions tab into next available row. I tried a PIVOT table and no good I played with few macro and not.

View 5 Replies View Related

Selecting A Range And Then Summing That Range

Jul 19, 2006

I am trying to select a range of numbers based on an active cell. I then want to sum those numbers and have that total reported to a specific cell.

For example:

Say I have a column with a list of dates (Jan/04 thru July/06). I want the user to be able to click on any given field and have that field plus the 11 fields above it summed and reported. Any help?

I came up with something like

ActiveCell.Resize(12, 1).Select

This only selects the data from the active cell and goes down...I need the opposite. I need it to select the 11 cells above the active cell (plus the active cell) and sum that data.

View 4 Replies View Related

VBA To Search Group Of Cells And Input Message If Value Is Missing From Group?

Mar 17, 2014

I am trying to write VBA code that groups cells between blank rows and inserts a message if a string of text (a name) is missing from the entire group. I want the code to search cells in column A and group the cells between blank cells. Use the name I input in an input box as the search criteria and insert a message in the Column C next to the last blank cell in the group and then move on to the next group and highlight the cell in red with bold text. I am including a spreadsheet with an example of what the sheet should look like before and after the code is run.

View 11 Replies View Related

Pivot Table Group :: Group By Integers And Not By Months, Years Etc?

Nov 12, 2009

I have date fields as column labels in a pivot table. When I try to group them I'm only given the option to group by integers and not by months, years etc.

I've had a look at the format settings of the column and they are formatted as date fields.

View 9 Replies View Related

Moving Average Input Range Display

Mar 30, 2007

I am using the built in moving average function to calculate the moving average of a set of numbers. There are a few things that i would like to do.

First i would like to have the last result displayed in a single cell. Then next to that cell i would like to have a cell that would specify the period of the moving average. I would like to be able to change the period in that cell and have that change it in the actual function. And finally i would like to have the moving average in a chart that would also change its period once that is changed in the respective cell. I realize that this might need some VB coding which i am currently learning.

View 14 Replies View Related

Macro To Copy And Paste A Moving Range

Mar 9, 2009

I have a macro that copies and pastes into another sheet. When I add a row of data into my spreadsheet I want the macro to be able to change the range size and copy and paste the add row with the prior data.

View 2 Replies View Related

Moving (pasting) A Range From In Between Certian Rows

Jan 15, 2009

Here's what I want it to look like:

Here's Macro Code I have thus far: ....

View 9 Replies View Related

Search And Return Values In A Range Group

Feb 15, 2008

I have a workbook that has rows of data starting at A5:G5 seperated in groups of 25 rows.
Example: A5 is numbered 1 and A6 is 2 A7 is 3 and so on to 25 then skip a row and start numbering again to 25.

What this is for is employees are placed in groups of 25 to be eligible for an award for safety.

What I want to do is Range G5:G650 is to be a place where an "X" is placed beside an employee who has had an accident then Range H5:H650 would return "Employee had an accident" I already have this part working.

Then I want to code a subroutine that would search for the "X's" and return the entire row data for each name in that group of 25 on a seperate worksheet.
This would then be printed so we would know which group's to exclude.

I know how to make it return the row of data containing the "X" but how can I make it grab the entire group?

There will be multiple groups of 25 each and each time an "X" is found within a group create a new worksheet for that group.

650 employees / 25 = 26 groups

View 14 Replies View Related

Count Specific Percentage Group In A Range

Mar 6, 2009

I have a column of equipment average utilization percentages. This column is a dynamic name range called "Avg_Util".

Values in this range were created by a calculation that results in a value of "", for equipment which have no utilization as yet, to those with a utilization of anywhere between 16% to 160% for those with actual hours in service.

I need to count how many have a utilization of <=50% and those that have a utilization of >=150%.

COUNTIF didn't work because it apparently counts the "" values (as zeros?)? I didn't fare much better with SUMPRODUCT either, but that could just as easily be the fact that I'm still new to that function. I get the feeling I'm overlooking something regarding working with percentages here to be having so much difficulty with something that just doesn't seem like it ought to be that hard.

View 5 Replies View Related

Selecting Specific Value Within A Range

Nov 12, 2008

I have a spreadsheet with Employee details and each employee has a Indicator and a Score.
I'm battling to get Excel to do a lookup on the Indicator, find the applicable Score Range, see if the individual's Score falls within the range and then inserts the relevant % into a cell in a specific row of each employee.

If we did not have more than 2000 doing it manualy might have been an option. Also, the Percentages and Score Ranges in the matrix might change a couple of times....

View 6 Replies View Related

Selecting Range Up To Blank Row

Feb 8, 2009

I am having a few problems selecting a range. What I am trying to do is select a range where the number of columns stay the same, but the rows are variable; ranging from one row upwards. At the end of the rows, there is a blank row. I currently have;

View 2 Replies View Related

Selecting Range Of Cells

Jan 31, 2009

I am trying to select a range of cells. The range I need to select starts in Cell A1. I need to select every row with data in column 1 up to the first row with no data. I then need to expand the range to all columns up the last column with data, including columns with blank cells.

The problem with my code relates to the selection of columns. It is only selecting up to column F. Column G is empty, Column H has data, Columns I-J are empty, Columns K-R have data.

View 5 Replies View Related

Selecting Range With Variable Row?

Apr 4, 2013

I want to copy a range where the row is variable (i in the Loop I'm doing) but the columns stay the same. What am I doing wrong?

Workbooks("Labor Info").Sheets("Transfer").Range("A" & i & ":E" & i).Select

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved