I have a userform that has two comboboxs on it. When the user clicks and selects an item in combobox 1 the code will highlight an area of cells that I set before. When the user clicks and selects an item in the combobox2 I need a piece of code that will highlight a second area of cells while still keeping the first areas of cells highlighted.
How I have it set up now if the combobox1.text = "Monday" then the cells B6:H20 are selected. But when the combox2 click event fires and selects another range of cells the first range selected by the combobox1 event is unselected. Is there a way to keep both areas selected?
In making my label printer, I will need to set the print area for multiple sheets based on a range generated in a cell. E.g. Sheet1 might need cells A1:P1200 set as print area, Sheet2 might need cells A1:G694 set as the print area, Sheet3 might not need to be printed, etc..
I have no problem generating a formula to state what the print area for each sheet should be, respectively, but passing that info into VBA has me really stumped. (Using indirect in the Page Setup menu doesn't work after the value has changed, it changes the value to a static reference, which is bizarre). I suspect I'd want to use the Sub Workbook_BeforePrint, but I'm not 100% on that. I will generally have 3 or more specific sheets selected using a button-triggered macro that gets a cell value of sheet names and selects those sheets.
My code is below. See how I have repeated the same code over and over for each row. Is there a shorter way to write this, perhaps a cleaner way. Im not an expert and I write what I know and most of that is long code that can be shortened.
I have a situation which I hope is fixable. I have frozen panes above and to the left of cell F5, therefore all columns to the right of column E scroll left and right and all rows below row 4 scroll up and down as required. My problem is that I also need the whole top row to remain static all the time.
I have a list of part numbers which repeat when there are multple prices they were sold at. For each unique part number I need one median price. The list if of about 500 parts but with the various different prices the file is 3700 rows. How can i do this quickly? For each unique part number I need one median price.
We are trying to find the median of a large set of numbers to calculate the median income in 2010. For an example we have 8,379k people with $2500 average income, 9,783k with $7500 average income and so on. How can I calculate the median average income of such a large amount of entries?
I have a list of properties with dates of purchase and sold, i need to find the median of a range subset with it that have an sold value equal to S. I cannot see to get the date range and sold value S in the subset so I can calculate the median, this is what I have but I dont think it is right. =MEDIAN(IF(Sheet1!$H:$H>=F165,Sheet1!$G:$G)) where H is the date column, G is the price, I have F column for the sold value, not sue how to put it all together.
I am trying to find the median for a huge amount of data, so I have cut it down to just an example size. I have uploaded a copy of the example file.
I have three price ranges that I have to find the median for:
Under $5MM $5 MM - $25 MM $26 MM - $56 MM
I need to find the median for each price range for Signed units and Sold units. I also have to find a median within a date range (e.g. within the last six months) that includes the previous criteria.
For the first formula, I have tried using the following formulas:
I have a spreadsheet with Data in Columns A-H. Column B is an ID value that will repeat an unknown amount of times. For each Value in Column B I need to calculate the Median, Mean, and GeoMean for the corresponding range of "G_:H_"
Ex. Column B Column G Column H
2 10 5
2 13 9
[code]....
I need the Median, Mean, and Geo Mean values to paste in Columns N-P for each different Station Index. My code only calculates for the first Station ID
Here is the code for what I have so far
Code: Sub Median() Dim r As Long Dim stndx As String Dim i As Long Dim x As Integer Application.Calculation = xlCalculationManual
I have long series of data in 8 columns (B, F, J, N, R, V, Z, AD) starting at row 5 down to row 86404. I want to find the total median for each row, where a condition is met for that row. The condition is if number>10 and the number is located in row 3 for each column (i.e., B3 for column B). So, if B3, J3, R3 are all >10, then I want to find the median for all the numbers in the columns B,J,R.
I assume there is an array formula that could do this? I've tried a few solutions with no luck.
Basically I need the macro to select clusters of zeros in each of the columns with a label of 10 characters (this is an arbitrary number I chose when writing the macro), and if the values of the cells immediately above and below the cluster are the same, change the value of the zeros to the value of those cells, otherwise, the value of the custers remain as zero. So far I have the following code.
I've attached a sheet with details. I have references that I want to copy to a different cell but I want the reference to stay fixed AND allow the column to move.
I've got a spreadsheet that could have 1 of 3 possible print ranges: PR1 = B2:K67 PR2 = B2:K132 PR3 = B2:K197
If there is a value greater than "0" in Cell B68, the print area would be PR2, but if there is a value greater than "0" in Cell B133, the print area would be PR3, otherwise it would be PR1.
These print ranges are such that the page break would would be below B67 and B132, but I'm concerned that I may need to set these page breaks in the Macro.
I'm not sure how to use the IF, THEN, ELSE, in the Macro to test the value of the cell and then set the print area.
can shut off the automatic calculation of a particluar worksheet or better yet, certain areas of a workbook, leaving the remainder of the workbook as Automatic? For example, a workbook with Sheets 1,2,3 and 4. Can Excel 2007 be set for automatic calculations on the entire workbook except for Sheet3?
I have a table that lists staff according to where they are located, all adjusted using drop down lists, problem is that some locations have 5 staff and some up to 40, so when I set up a macro to print the area, those with 5 consultants look very small because the page area is so big. how can I adjust the print area dynamically so it only prints to 1 row below the last line with text?
'Get all the sheets 'y = 3 Sheets(1).Select Worksheets.Add Sheets(1).Name = "OM Files" For J = 2 To Sheets.Count With Sheets(J).UsedRange x = Sheets(J).Name If x "xxx" Then .Resize(.Rows.Count).Copy _ Sheets(1).Range("A65536").End(xlUp)(3) End If End With Next Application.DisplayAlerts = False
I have an Excel sheet that I want to scroll up and down and I want an area in the upper right-hand corner to display static information. This information could change as more input into the sheet is performed, but it always must remain in the upper right-hand corner.
For example, let's assume the sheet has 200 rows to enter in a credit card application. There would be an area in the upper-right that would display information for some of the cells that were typed in. So as you type information, labels would display information from the form. I know that I can program the selection change event to re-position the box and labels, but if I scroll off the screen, the area does not stay there until I click on a cell on the page. I am using XL2003.
I have been conducting seasonal characteristics of the availability of certain fruits and vegetables in the region I am in (Italy), now I want to compare the data from my first seasonal characteristics region (Texas). My goal is to see trends, view characteristics of climate in that given month in an easy view.
I have data for both lists containing over 50 vegetables / fruits each. Along with different side notes that show factors of each month like climate, availability, flavor profiles, and cooking techniques.
Is it possible to put it into format showing a 12 month period, (jan, feb, mar,......) and then putting the type of fruit/vegetable to see trends? along with adding the side notes...
I have locked print areas on 7 work sheets. I have successfully printed them at 1 time. However it appears as if the print areas have to be set again before I print them again? What's up.
As you can see, when I go to print preview, I will want the first and the last four to be formatted landscape and the second and third to be formatted portrait. This is all I want the macro to do. Then later when I go to print, I want to be able to print them all together. Is there a way to do this? Perhaps by letting the first printarea be on its on sheet, the second two on their own sheet, and the final four on their own sheet?
i need to pull data from one spread sheet and place it in a new spread sheet. and i am not that familiar with macros i am learning but i need to get this done.