I have a spreadsheet with employees and data listed. The drop-down in A1 lets someone select the employee and then it hides the rows for all other employees. I want to add the names of supervisors in the drop-down of A1 and have it select only the employees under that supervisor and hide the rest. The number of employees under each supervisor ranges from 3 to 6. This is what I have to hide the rows when selecting a single employee :
My workbook has stats data on the "Master" sheet(sheet #1) and analysts and supervisors on "Analysts" sheet(sheet #12). Data validation for cell A1 on "Master" sheet has all the analysts and supervisors in the first column of "Analysts" sheet with title "Select Analyst" in cell A1. I modified the "Analysts" sheet to show supervisors from B1:I1 and listed the analysts in the appropriate columns below them. Not sure how to make it select the analysts when someone selects the supervisor on "Master" sheet .
I would like a macro that select all cells based on multiple criteria. It's a big sheet, but I've made it smaller in the following example.
In row 1, there are 2 headers, in B1 (electricity) and C1 (gas) In column A, there are 3 houses, in A2, A6 and A10. The blocks of cells in between (e.g. B2:B5) have 2 headers, 'period' in B2, and 'account number' in B4. B3 and B5 have a list of options in them.
I want to select cells that meet certain criteria. Either electricity or gas, and either period or account number. So, if in cell D1 I choose electricity and in D2 period, I would like to select B3, B7 and B11. If I choose gas and account number, I wish to select C5, C9 and C13.
Is there a way (with a macro?) to select all rows within a certain range (e.g. from row 3 to the end of the sheet) SEPARATELY, just as selecting them manually with ctrl+select?
Like in my example sheet; I would use the AutoFilter on row 2 to show only the items with prices equal to 30. Now I want to select the entire rows (name, amount & price) of these two items, so that when I turn of the AutoFilter the two rows would still remain selected.
I have 2 workbooks. The workbooks have 36 tabs for each department. Workbook 1 are current charges for the departments and workbook 2 is the revenue for each department. I would like to take the top 2 rows from workbook 2 and add them to workbook 1 at the bottom of each tab. I was able to get it to work to a specific row but the workbook 1 has variable rows for each tab.
I'm trying to create a macro that will allow the user to select a range of cells, (in column V in the attached sample), and then insert a new worksheet and copy the entire row where the user selected the cells to that worksheet.
For example: (I've deleted most of the data from the sample). The user want to create an order that has an exteded cube of 300 feet. By holding the "Ctrl" key down, they could pick and choose the parts they want to add, until the sum in Excel shows nearly 300.00 extended cube. They would then run the macro, which would copy only the rows which the user has selected in column V to the new worksheet.
I am interested in selecting cells in alternating rows as follows:
12 Red Happy 00 Unique descriptor 13 Grn Sad 03 Unique descriptor 14 Yel Happy 02 Unique descriptor
I am interested in selecting all the "12, 13, etc", "Red, Grn, ..." and "Happy, Sad..." for analysis, but want to skip all the rows containing the 0- numbers and the descriptors for them. How do I quickly select only the alternating cells in a column within a selection?
I would like to select all cells in column A that begin with the text "SP". Some cells will be contiguous but others will not. For instance in one case, I would like the macro to select cells with the text "SP" which would result in cells A1, A2, A3, A10, A15 being selected. I am working on building a macro that will then do other things to these cells/rows so this is the first step.
The below code will select the first cell with "SP". How would I alter this code to only search Column A and select multiple cells? or totally different code.
Code: Sub test() Dim r As RangeSet r = Cells.Find(what:="SP", LookIn:=xlValues, lookat:=xlWhole) If Not r Is Nothing Then r.Select End Sub
I am trying to select a shape in a cell and place a cell reference into the shape. I know the cell address, but do not know the shape reference. (The row that the cell and shape reside came from copying the row from another sheet and inserting it into the current sheet). I can not seem to come up with the correct code to accomplish this. Right now I have:
Where r+1 is the row where the line finally resides after insertion and "AW" is the column to the right of the cell where the shape resides.
I have tried to put the cell reference into the shape at the location where it is copied from but the reference is not dynamic and I can not seem to get it to be. Another issue that will arise is that the rows in the new sheet will probably be sorted and I question if the cell reference will follow the shape's new location.
This very simple code brings me to M402 everytime I click on the button.
However, I would like to stay in the same column that I am at the moment when I click the button, and go to row 402. (i.e. if I am in cell "Z56", I would like to be redirected to "Z402" when I click the button.
I have multiple excel workbooks open at the same time. I need to run a macro on one of them every 15 min but I need to return to the active window when the macro is done. How do I read what window is active then return to it when the macro is done?
Sub AutoSave() dTime = Now + TimeValue("00:15:00") Application .OnTime dTime, "AutoSave" Windows("data.xlsm").Activate Sheets("Data").Copy Application.DisplayAlerts = False ActiveWorkbook. SaveAs Filename:="c:excel" & Format(Time, "hhmmss"), FileFormat:=xlCSV ActiveWorkbook.Close Application.DisplayAlerts = True Windows(1).ActivatePrevious End Sub