Macro: Small & Large Formula
Dec 6, 2006
I wondered if there is a possibility to make this
Range("L3").FormulaR1C1 = "=SMALL(R[-1]C[-11]:RC[-11],1)"
Range("L4").FormulaR1C1 = "=LARGE(R[-2]C[-11]:R[-1]C[-11],1)"
more simple so i can get the range for my small and large formula's variable? What i try to reach here is:
Range("L3") = smallest date In Range("A2", Range("A" & Rows.Count).End(xlUp))
Range("L4") = largest date In Range("A2", Range("A" & Rows.Count).End(xlUp))
View 6 Replies
ADVERTISEMENT
Jan 8, 2010
I'm having a difficulty using LARGE and SMALL.I want to return the 1st to 5th value of an array (each in a different row) choosing months as criteria. While the LARGE formula works fine, when I replace the LARGE() formula for the SMALL() leaving everything else unchanged, the formula returns ZERO and there are no ZEROS in the original data! Here is the function:
View 4 Replies
View Related
Aug 8, 2009
I'm writing an application in Excel, its a little over 5MB after I've run through UsedRegion and trimmed stuff, 94 worksheets. I'm encountering a fair number of crashes these days. My OS is fully patched as is MS Office. Running Windows server 2003 and Excel 2007.
I was wondering about the pros and cons of writing an application in one large workbook or many smaller ones. So far its been one large one but these crashes are really impeding my progress.
What's the best way to remedy these crashes or even start to diagnose?
View 7 Replies
View Related
Sep 3, 2009
I have a column of number that I want to use the Small & Large function on, skipping duplicates.
Example:
Column A has the following numbers;
1
6
1
4
3
2
4
6
17
8
21
8
10
13
I want the Small function to identify the first lowest number (1) and then the second lowest number (2), not (1) again.
View 9 Replies
View Related
Mar 23, 2009
I have a data dump, on this single excel sheet their are a large number of tables, up to 100 in all, and what i need to do is extract key figures to form a summary table which i then produce stats for.
What i need is a macro or code that will automatically scan the tables, retrieve the key figures and return them in my summary table.
Attached is an example, you will see three small tables labelled Servicing query complex, servicing query simple and total.
I need to extract the blue cell, being the name of the table, the purple cell being the last figure in column c in each table (total number or processes) and the green figure being the the average turnaround. The final figure is i think the hardest to get as its the total number of figures in column c that have either a 0 or a 1 in Colum A. Note that their will be table where neither 0 or 1 will appear.
All figures are dummy figures but the table structure is correct.
View 14 Replies
View Related
Oct 17, 2011
I have sales data in columns, the right most column has values in it.
If I filter the data using the standard Filter, I can add only filtered records by using SUBTOTAL(9, filtered_list) and this gives me the answer.
How can I find the 2nd largest or second smallest ONLY from the filtered data without using a Pivot table?
View 5 Replies
View Related
Feb 9, 2012
I have a question about sorting. I would like to sort multiple columns from small to large at the same time. Is this possible? I have over 400 columns to sort so I would rather not do this one column at the time.
Example
A.... B.... C
0.2 0.4 0.3
0.4 0.3 0.5
0.1 0.6 0.1
shoud be
A.... B.... C
0.1 0.3 0.1
0.2 0.4 0.3
0.4 0.6 0.5
View 1 Replies
View Related
May 28, 2009
I understand how to find the top 5 /bottom 5 values using the large/small functions, but the question I have is: How do I get associated fields. For example I attached a sample sheet with values (Fields: Ticker,TE,Sector,Return). How do I get the Ticker,Sector that the return is for. I'd like to show all the associated fields that relate to the retun, but I can't find the solution on how to do that.
View 3 Replies
View Related
Jun 26, 2013
I have a file that has been produced using Statistica software. The file is supposed to have around one million rows, and when exported to Excel the file is about 30 MB. When I open the .xlsx file in Excel 2010 only two pages of data appear. The rows also have weird numbering. The first square of the A column is A1. The second is A3833, the third is A6789, then A8161, then A8162, then A8163, then A8164, then A18070.
The scroll button to the left of the screen is long, as if the document was only two pages long. When the scroll button is click-and-dragged a small beige square appears with a row number. This small square seems to be aware that not all rows are shown as it shows many more rows than are visible to me.
View 3 Replies
View Related
Mar 3, 2014
I am trying to use excel tools to clean dirty data and compare the two cells. The information is there but tainted with additional information that is not relevant. I have tried to use Left/Right tools to capture alpha characters leading an address number with no real success. Also, when I get the data it seems to have some embedded breaks that I can't seem to get rid of that cause my tasks to error too.
View 4 Replies
View Related
Dec 10, 2008
I have the formula (found in cell "C2") on the Report sheet. I need to perform a function, but I cannot get it to work on the sheet I need to pull information from. The sheet RecapWk12 has a small section pasted (with some cells edited for obvious reasons) from the actual workbook. I can get the formula in Report cell (A10) to work on pulling information from sheet2. You can see I am getting (#REF!) in cell C2.
View 3 Replies
View Related
Mar 13, 2014
I am trying to get the following thing started but my loop doesn't succeed. I've got 3 columns. I need to place a formula in column C if A is empty.
Example:
A2 contains data so do nothing.
A3 is empty do: C3=B3+B4.
A4 contains data so do nothing.
A5 contains data so do nothing.
A6 contains data so do nothing.
A7 is empty do: C7=B7+B8.
this is what I've got so far:
[Code] ..........
View 4 Replies
View Related
Jul 28, 2009
Ok, I want to use a dynamic range in my Vlookup formula.
I want to use this formula: ....
View 11 Replies
View Related
Jul 21, 2006
I need to complete my business price list. Basically it's an XL sheet with all my suppliers products listed, there price, my margins, and my retail price and bulk price. Currently I'm fiddling with my margins and the best way to implement a formula to reflect these margins. Rather than do it manually, is there anyway I can create a forumla for different gross margins to be set for a certain range of the suppliers goods. For example, any product I buy thats costs me between $0-$20 has a set margin of 1.44 (44%), or a product who's price ranges from $100-$200 has a set margin of 1.26 (26%) etc. This would cut out then need for me to manually check suppliers prices and change to margin accordingly, thus saving me much time.
View 7 Replies
View Related
Jun 28, 2007
When I try to record macro, the small toolbar which has two buttons "stop recording" and "relative reference" do not appear. I need to turn relative reference on.
Can you please guide me how can I make it visible to turn relative reference on?
View 9 Replies
View Related
Sep 15, 2014
I have one data tab which constantly changes. (adding more products and corresponding volume/prices) For the lookup tab, I want to look up one value and return multiple values.
I have figured out an index array formula but it just calculates so slowly. My live file is about 8MB now. When I apply my formula, it takes forever to save.
View 7 Replies
View Related
Mar 24, 2008
i have this formula below which works but if the criteria is not there it says FALSE because of the B22:C45,2,0) bit i would rather it says something like "no dissertation" is that possible? ...
View 10 Replies
View Related
Nov 25, 2008
I'm using Excel 2007 and the sheet has 238536 rows containing 26412 ranges.
The first 5 rows in each range contains data. I wish to input into the sixth cell of every range a formula. Not essential but I'd prefer it to be formatted blue.
I attach short s/s to illustrate my need.
View 2 Replies
View Related
Feb 25, 2007
I'm using a "Large" formula with a variable for the number of cells to sum and then later divide by. However, I want the Large formula to look at the X largest values from a column three to the right, then sum the values in the original column. This wouldn't necessarily be the X largest cells in that original column. I believe this would be some sort of offset, but I'm not very good with those.
View 3 Replies
View Related
May 26, 2014
In cell G1 I have my snapshot dates header and dates running from G2 to G31. Next to in Column H I have the sold items by Product A.
There are 6 different snapshot dates and I need them to be horizontal with a formula and none duplicated with the largest (newest) date first so I can SUMIF the sold item per date. If I simply pull a LARGE formula it will return 24-05-2014 in all rows is it is the biggest "value".
When I them add new snapshots (biweekly) then the horizontal snapshot line will automatically add the newest dates (i.e. find the largest or newest, the 2nd newest snapshot, the 3rd newest, etc. Hence, in K2 we would have 09-03-2014 with 672 sold items in K3 (via SUMIF), in L3 we would have 18-03-2014 and 7523, in M3 23-03-2014 and 1703, etc.
I'm not sure if I explained it well enough. I'm attaching a file if this makes more sense.
G1 G2
Snapshot DateProduct A - Sold Items
09-03-201423
09-03-2014354
09-03-201435
09-03-2014254
09-03-20146
[Code] .......
Latest Snapshot
09-03-201418-03-201423-03-201410-04-201424-04-201424-05-2014
6727523170310787201035
View 12 Replies
View Related
Oct 15, 2008
I am using following event macro and it repeats itself more than 300 times. I am at a stage where I am getting a message "Compile Error, Procedure too large", I tried to break it into two but that's not working.
Option Explicit
Option Compare Text
Private Sub Worksheet_Change(ByVal Target As Range)
Dim cl As Range
Dim lng As Long
Application.EnableEvents = False
Select Case Target.Address
Case "$E$3"
If Target.Value = "Yes" Then
SelectNumber:
lng = Application.InputBox("Please enter number 0 to 100", , , , , , , 1)
If IsNumeric(lng) = False Or lng < 0 Or lng > 100 Then GoTo SelectNumber
Range("G3") = lng
Else: Range("G3") = 0
.................................................(above statements repeat more than 300 times for different cells)..............................
Application.EnableEvents = True
End Sub
View 15 Replies
View Related
Jul 23, 2008
I am creating a summary financial sheet in Excel 2003, Win XP. It needs to show the top 10 sales variances from a large data list, along with the associated department.
I can bring in the top 10 largest variances using Large(array,k), but because variances are either positive or negative, I'm not really showing the true top 10. To fix this I can use absolute values via Large(abs(array),k) but then I don't know how to convert the value back to its original sign (positive or negative).
If I could somehow get the cell reference that the Large(abs(array),k) formula points to, I could do something like this:
=Large(abs(array),k) * (Large Cell Reference/Large Cell Reference)
I'm afraid to use the address function because of duplicate sales variances. I often have several variances of with same value, so I might not truly be pulling the address that the large(abs(array),k) is pointing to.
View 9 Replies
View Related
Aug 6, 2003
I've got a 80 Mb CSV file and would like to open and work with it. Too many lines (90000 or so).
Is there a way to split ( ) this file so I can open two files instead?
View 9 Replies
View Related
Jan 6, 2010
Need the code to put into a command button which jumps from the cell selected, X number of cells to the right. Also will need the code to jump back again when clicking on a different command button.
View 5 Replies
View Related
May 25, 2007
See attachment. For example, imagine data in cells A2:N25000 (obviously, this example in the attachment has been shortened). At this point, also imagine that rows 7 & 8 did not exist. So, there is a continuous stream of data for vaious counties in A2:N25000. For the purpose of context, the data contain mortgage information for all the lenders in a particular county for an entire US state.
Is it possible to create a macro that would insert two rows after each county in the data range (e.g., rows 7 & 8 in the attachment)? In other words, in the first row a macro would insert a row (row 7) that sums the results of the top 25 lenders in each county. Then, the macro would insert a second row (row 8) that sums the results of ALL the lenders in each county?
View 2 Replies
View Related
Mar 16, 2008
Auto Merged Post Until 24 Hrs Passes; Auto Merged Post Until 24 Hrs Passes; Auto Merged Post Until 24 Hrs Passes;
View 9 Replies
View Related
Jan 17, 2013
I've been unsuccessful in trying to write a formula that retrieves a single result based on two criteria (from a large set of data on a separate worksheet). I've tried various INDEX MATCH combinations but no luck.
A
B
C
D
E
1
DATE
TEAM
PITCHERS
RESULT
2
4/1
nyy
Sabathia
???????
[Code] ........
So this is a very simplified version of my real data set which is about 20 times this size. The first worksheet is where I want to store my retrieved results (lets say D2 for example). I want to retrieve data from the second worksheet that matches two criteria (exactly) originating from my first worksheet. The two criteria to be matched from the first worksheet are, for example, A1 (sabathia) and F2 (the date 4/8). The complicated part is the desired result should be from the corresponding K/9 column in the second sheet, which in this case (based on sabathia and 4/8 criteria) is I2 (result would be 3). It's complicated since I can't just tell the formula to look down a specific K/9 column, I need to search ALL the K/9 columns in the sheet (of which there are many). Is this even possible with some sort of nested INDEX MATCH? Any possibilities outside of VBA programming, or is that the only way?
View 8 Replies
View Related
Nov 2, 2009
I am trying to use a simple formula: COUNTIF($CT$2:$CT:$430749,CT2)
I am trying to fill this down all the rows (430,749 rows). The formula behaves as its supposed to up to around row 650. After this point, all resulting values are all the same, which happens to be the same value that was returned from the original formula in C2. However, this is not correct. It's like the formula just stops working after row ~650. I tried F9 without success.
View 9 Replies
View Related
May 29, 2013
I am running into a Procedure too large error when running my macro. My macro is designed to replace a cell value with another cell value in a list. When the cell value is replaced a vlookup brings in new data to my workboook. Then the macro refreshes all the pivot tables and saves the workbork. I want my macro to repeat the above 60 times, so I have copied the code 60 times and changed the ActiveCell.FormulaR1C1 to point to the next value in my list. (Is there another way to select the next value from the list without changing the Row and Column number?) This is where my macro fails.
Below is my code.
VB:
Sheets("Data").Select
Range("B2").Select
[COLOR=#FF0000] ActiveCell.FormulaR1C1 = "=RC[25]" ' AGC GRP_ID[/COLOR]
Sheets("Ship pivot and cum triangle").Select
ActiveSheet.PivotTables("PivotTable4").RefreshTable
Application.DisplayAlerts = False
[Code] .....
View 9 Replies
View Related
Nov 23, 2009
DoneyOte on this but i have added to the range and im now getting an error that i can't seem to fix
View 12 Replies
View Related