Excel 2010 :: Copy Range Of Cells From One Sheet To Another Depending On Option Being Selected From Dropdown Box
Aug 13, 2012
Using macro's on Excel 2010. What I'm trying to do is create a macro that will copy a range of cells from one sheet to another depending on a option being selected from a drop down box. I've tried to use formulas but without success.
sheet 1 contains a list of approx 20 people with rows containing sales figures per week.
Is it possible to have a macro that will copy the rows to sheet2 depending on the dropdown? The drop down has already been setup with people's names
E.g.
if sheet 1, cell a1 (with data validation setup) dropdown contains "mr smith", copy sheet2 row A1:A9 to sheet 1 cell a2
or
if sheet 1, cell a1 dropdown contains "mr cooper", copy sheet2 row B1:B9 to sheet1 cell a2
etc... for each name in the dropdown
The idea is so that i select a dropdown and it copies the sales figures that match the dropdown name, if i then select another dropdown, the corresponding figures are copied to the same place.
View 3 Replies
ADVERTISEMENT
Jul 12, 2013
I attached a sample spreadsheet but I was wondering if there was a code that could display a range based on an option selected in a dropdown box.
excel help.xlsm
View 3 Replies
View Related
Jul 25, 2014
I am using this code to hide or unhide rows of text on another sheet:
VB:
Sub ProcessSheet1ChangeOnCellJ7(ByVal Target As Range)
Dim sAddress As String
Dim sValue As String
'Get the address of the cell that changed without '$' signs
sAddress = Target.Address(False, False)
[Code]....
When the "Not Pursuing" list box option is selected (in cell "J7" or "J8" in Sheet 1) I need to add (or over-write) "Not Pursuing" to the range of cells in column "B" (in the "Tasks" sheet), but only for that particular Goal, meaning a limited range of cells in column "B". If the "Pursuing - Show All Tasks" option is selected for a Goal then these same cells need to be blank so that the appropriate person can enter their name into the cell.
The purpose for adding "Not Pursuing" automatically to these yellow highlighted cells is that it will facilitate filtering of tasks by individual in the "Tasks" sheet..
Again I have tried several times to upload a sample file and am unable to, which I know makes it more difficult to solve. (Is there some common mistake people make? I know it's an allowed format and is very small in file size....)
Code solution can be entered directly beneath:
VB:
If Target.Value = "Not Pursuing" Then
ActiveWorkbook.Sheets("Tasks").Rows("29:29").EntireRow.Hidden = False
ActiveWorkbook.Sheets("Tasks").Rows("30:48").EntireRow.Hidden = True
View 1 Replies
View Related
Jul 17, 2014
I have a log that is used to keep when items are due. I do not want my coworkers to delete items once they have been entered and saved. So the excel sheet I am trying to make has certain cells in a range that I want to autolock after saving. For example: the cell range is G3:J402. I enter Customer Name in Cell G3 and the Date the job was received in H3. Once i enter that information I want it locked once i save it. Then later on, my coworker completes the job and enters the date in I2. And again once she saves this she shouldn't be able to edit this information. Then again another day she comes and enters the date on I3 when the product has been shipped out.
While all of the above activity is going on, new customers are continuously being in added in G4, G5....
Also, if possible the date in the H range should be the date items are entered in G (this would be a nice added feature). I've included the file for review. I'm running Microsoft Excel 2010
[URL]
View 1 Replies
View Related
Jul 17, 2014
I have a log that is used to keep when items are due. I do not want my coworkers to delete items once they have been entered and saved. So the excel sheet I am trying to make has certain cells in a range that I want to autolock after saving. For example: the cell range is G3:J402. I enter Customer Name in Cell G3 and the Date the job was received in H3. Once i enter that information I want it locked once i save it. Then later on, my coworker completes the job and enters the date in I2. And again once she saves this she shouldn't be able to edit this information. Then again another day she comes and enters the date on I3 when the product has been shipped out.
While all of the above activity is going on, new customers are continuously being in added in G4, G5....
Also, if possible the date in the H range should be the date items are entered in G (this would be a nice added feature). I've included the file for review. I'm running Microsoft Excel 2010.
I have tried hard to find other solutions with links at the following places but not exactly what I'm desiring:Auto lock cells after data entry when file saved...
Auto lock cells after data entered and SAVED.
Auto Lock Selected Range of Cells After Saving
I should also mention that most solutions either provide for locking/unlocking of all cells but not a selected range. Or they provide for locking/unlocking of a selected range but not for a specific sheet or not after you have saved the workbook.
This is unique in that I'd like it to autolock after i press the save button for a SPECIFIC number of cells. I just wanted to clarify as to not make others think that I haven't used the search function.
View 1 Replies
View Related
May 30, 2014
Im looking for a macro that can get a cell RANGE, the data in the RANGE will be copied then if the checkbox is selected it will copy the same data in the RANGE and add the selected checkbox in next column
I have column A and Column B < this is my selected range
Capture1.PNG
I will have a form that has checkbox and buton.
When all the checkbox is selected. when the button is click. the result will be.
View 1 Replies
View Related
Aug 7, 2008
Hi. Does anyone know a formula to copy a selected range of cells on sheet one to a range on sheet three when a check box in checked. Ex. copy range a4:j4 on sheet one into a4:j4 on sheet three once the check box for on sheet one is checked?
View 9 Replies
View Related
Feb 3, 2010
I am having issues with this Macro since I have to run it on computers only supporting Excel 2003 and computers with Excel 2007. The Macro in use is as follows:
--------------------------------------------------------------------------------------------------------------------------------
View 9 Replies
View Related
Feb 22, 2009
The rows will differ depending on the Active Cell that's selected and I don't know how to specify this.
The range I want to copy is from Column B to DA on the worksheet ("Staff") which I want to paste to another worksheet ("Leavers"). This is as far as I got
'FindRemove = lstRemove.Value
'If FindRemove = "" Then End
' Goes to the start of the Data column
'Sheets("Staff").Select
'Range("B4").Select
' Tests current cell against FindRemove
'Do
'If ActiveCell.Value = FindRemove Then
'Call CopyPerson
'Exit Sub
'Else: ActiveCell.Offset(1, 0).Select
'End If
'Loop Until ActiveCell.Value = ""
'End Sub
View 9 Replies
View Related
Jan 30, 2010
What I would like to do with the information that I have put together on a different workbook is to reference an Agent (column A), and a time range (Date is in column D) and then copy the row from A to I for each occurrence during that range of dates so we can see how many and what errors have occurred during any range of dates selected. (I will have different people inputting errors at different times so the dates will not be sorted unless they have to be). I want to be able to select different agents/date ranges to be able to get a glance of how that particular agent did during this time frame.
Here is an example of the work sheet where the data is originaly.
[Removed]
Here is an example (in a different workbook) of what the sheet should look like if I was searching errors for Albert Ozier between 1/25/2010 and 1/28/2010.
[Removed]
View 9 Replies
View Related
Dec 31, 2013
I have an excel sheet which looks similar to below and with some more columns.
HTML Code:
AreaBranchEmpolyeesProductsShelfs
Area1Area1 Branch110Product 110
Area1Area1 Branch25Product 16
Area1Area1 Branch38Product 28
[Code] ......
I want to have data in other sheet With respect to Product details. Where It gives me the count of Product 1 and so on.
I am able to get the count using countif function and it displays like below.
HTML Code:
Product Count
Product 16
Product 28
Product 34
Product 49
Product 510
Product 68
Product 78
Product 89
Product 97
Product 108
What I want is when I select "Product 1" It should display some selected columns data from sheet where complete data is available.
HTML Code:
Branch Empolyees Other
Area1 Branch1 10 abc
Area1 Branch2 5 xyz
Area1 Branch5 7 pqr
Area2 Branch5 5 wxy
Which function we can use. I tried Vlookup but was not successfull.
View 14 Replies
View Related
Mar 27, 2014
I have on sheet "Charts" in cell "B20" a "date from" and in cell "C20" a "date to" (these will be input manually).
What I need is to check Column "F" on sheet "Report" for any cells within those dates, I then want to copy the entire row(s) that contain these dates and paste them into sheet "Weekly" starting at cell "A2".
Using excel 2010
View 4 Replies
View Related
Apr 25, 2013
I'm trying to copy data from one sheet to another sheet automatically based on a number selected in a drop down control.
I have used OFFSET to pull some information successfully from a list. This is easy for me to do with single entries and a list and has worked well. I want to do similar but with a dataset not just single cells.
But, I can't seem to make OFFSET work to show a set of data easily.
Perhaps I will need VB code to do so? Or there is another control I'm not aware of? I've done very little with VB.
I'll attach a sample file to try to show better what I'm trying to do.
View 7 Replies
View Related
Mar 27, 2012
The concept is to have a user open a sheet that breaks down that current day into 15 minute blocks of time. Later, I will work to append that to an Access DB or to a master Excel sheet as I will have multiple engineers inputing times for multiple days. There are multiple paths for this....We don't have Access for everyone yet or I would look at that path now.
Right now I am trying to make the initial input screen easy to use so that they actually use it.
I want to allow the user to select multiple 15 minute blocks and then click a button that adds a specific value to each of those cells. For instance, they might choose 8 15 min blocks that are not necessarily blocked together (C5, C7:C10, C15, C20:C22) They would hit the "Project 1" button and "Project 1" would be inserted into each of those cells.
I have about (5) categories so I would simply have (5) buttons with the different inptu strings.
But how can I have a macro set the value for multiple selected cells? Ideally, they would not have to be blocked together but, if there is no other way, if I could have blocks of cells filled in all at once.
I am using Excel 2010.
only a few of us have Access but I will be the only one accessing the collected data. Besides, I would make Excel query the Access DB for more general use. I
View 2 Replies
View Related
May 15, 2013
I am looking to write a code to lock/unlock cells based on values selected using a drop down list (see attached Excel) For example if Netherlands is chosen as the Country (Column A), then except for the columns Amsterdam (column B) and Eindhoven (column C), all other columns must be locked. Similarly, if India is chosen as the country from the drop down list, then only the columns New Delhi and Mumbai must be editable for the user, the rest of the columns remain locked.
I tried tweaking some of the lock/unlock codes around, but got lost especially with getting to run the macro - still trying to come to terms with running a "Private Sub Worksheet_SelectionChange" function in the sheet from "Module"!
View 1 Replies
View Related
Jun 6, 2014
But for the life of me, I can't get it to do what I need it to do. Excel 2010 user, and I've attached my file with the information, and descriptions.
View 5 Replies
View Related
Feb 23, 2007
I have a button on the Players worksheet that has this
Why would it not work?
Range("NewData").Range("B5:B" & Cells(Rows.Count, "B").End(xlUp).Row).Copy
Sheets("Players").Range("A3").PasteSpecial Paste:=xlValues
I am trying to copy Column B starting at B5 down to the last used cell in column B. into the players sheet starting at cell a3.
I try it and it highlights 4 cells and that is it???
Michael
View 9 Replies
View Related
Jul 22, 2014
I will have a summary tab and then a number of tabs with various options in detail
What I would like to do is some way of adding the options on the summary tab - some sort of drop down I guess
Is this possible without lots of programming etc...
View 4 Replies
View Related
Jul 11, 2012
Software: Excel 2010, Windows 7
What is the VBA code for inserting text in all column B-cells of multiple selected rows?
I am creating a worksheet with a table containing various data related to orders of various materials (this is more or less data gathering from an older, paper-based 'system'). This table spans, columnwise, from A to D and expands downwards as more orders are added. The information in each column is: A=order number, B=type of material and C=material specs. and D=additional comments.
I've set it up so that the only thing I really have to do is to insert the type of material in the cells of column B, and the rest will sort itself out. Instead of having to insert a new row for each new entry and manually typing in the name of the material (these entries are often done in the midst of already existing data), I created several similar, macroed buttons for the different types of materials we use. These macros work by selecting the row of the currently active cell, inserting a new row and then add the name of the material in the column B-cell of this new row. What I am having trouble doing though, is to get the text-entry to work for a selection of multiple cells.
As an example, lets say that I would like to add 5 orders of "Grade A Steel" in the middle of the table - in the row above row 8. With the macro I currently have I can select cell B5, click the macro, and a new row will be inserted with "Grade A Steel" in column B of this new row. This action could be performed 5 times over, but would be easier if I could just mark a range of 5 cells, say B8:B12, click the macro and get the text/data inserted the column B-cells of all 5 of the new rows. So far I've been able to create a macro that inserts multiple new rows, but I've only been successful in filling the column B-cell in the first row leaving the 4 below empty.
View 8 Replies
View Related
Sep 9, 2008
I would like some code to allow the user to select any row in Sheet1
and then the populated cells (10 in every case) in that row will copy across to various locations in Sheet2.
eg,
The user selects Row header for Row 12 which has 10 cells ( A12 to J12) populated.
A12 will go to C3 on Sheet 2, B12 to D5, C12 to D9, etc, etc.
View 9 Replies
View Related
Nov 20, 2006
i need to copy the selected cells, and paste them on another sheet on same locations, this should be done on button click
View 6 Replies
View Related
Jan 15, 2014
I want to select the rows that i want to copy then I would like a command button to unlock the sheet using password "2014", copy & paste my selection in the last empty row, and then lock the sheet.
View 9 Replies
View Related
May 8, 2009
This spreadsheet must perform calculations for every line since new items are added every day, so VBA is probably better than copying formulas down every line of the spreadsheet:
With the press of a button, I need to be able to select a range of dates and copy all lines within the range to a seperate sheet with the desired name under the same headings they currently reside under. I have included some modified code that is being used in another spreadsheet that was created for me, but I do not pretent to understand all of it and I no longer work with the creator of the spreadsheet. How do I use a button to open the form for date selections and entering the name of the new sheet, and then use the start button on the form to begin the matching and copying to a new sheet? If there is an easier way I am all for that too.
Also, I need to keep a total of all items by month as well as a monthly and annual average of the Total Item Value on the FY09 tab. This will eventually produce another sheet when a button is pressed to submit as a report. I think part of this answer is in using the MONTH(serial_number) function but I can only get this to work for a single cell. I need to search the entire Distribution 'D' column, match all the months to the FY09 tab to the respective month, and calculate the totals and averages. I think SUMIF may also be needed as well but need the MONTH(serial_number)to work first. If there is a way to code all of this in VBA that would be fine as well.
I have a pivot table on Sheet1 where I am trying to get the totals and averages described above but I am not sure it can do what I need. In column 'B' I need the total number of each item as well as the total number of all items. I tried various formats and adding the totals from the Totals tab but I have not figured it out.
View 7 Replies
View Related
Oct 8, 2009
figuring out a code for a command button.
I have 2 sheets open with the following set up:
Sheet1
A2 = Name (chosen off sheet2)
A3 = Job Title (chosen off sheet2)
A4 = Department (chosen off sheet2)
Sheet2
Column A = List of names
Column B = Corresponding Job Title
Column C = Corresponding Department
I need to be able to choose a name off sheet2, click the command button and it send selected name, job title, and department to sheet1 to the respective cells.
View 9 Replies
View Related
Jan 19, 2012
I can't seem to find a way to copy specific highlighted/selected cells in a filtered list column and paste them outside of Excel 2003. i.e. in Notepad.
It seems to copy all the data between what is selected.
My Filtered list shows rows 5, 28, 35, 40 and 56
If I selected A5, A28 and A40 and select copy
If I paste it into Notepad, it adds A5, A28, A35 and A40
However if I paste my selected copied cell into Excel it works perfect and only adds A5, A28 and A40.
View 2 Replies
View Related
Jun 10, 2014
I am trying to copy/extract row of data from worksheet(Detail)A:W to worksheet(1st Letter) if X=1st Letter on worksheet(Detail). I have never used VBA and i am not sure if this can be done with a formula.
View 2 Replies
View Related
Feb 7, 2013
I am using Excel 2010 and basically i am trying to fill a range of cell with a green color if any value was enter in a specific cells. Example: I would like to fill range: A10:c13 with a green color (regardless of the cells content in this range) if a value was entered in cell C10 or C11 or C12 or C13.
I've tried conditional formatting but unfortunately I'll have to apply formatting for every cell and for a range of over hundred cells is not efficient.
View 7 Replies
View Related
Mar 23, 2014
First sheet has a client name and several cells of data along the same line. All of the data on this sheet is kept long term.
The second sheet is completed copied and deleted. In completing the second sheet the client name is selected of a drop down list and pulled from sheet one.
What I want to do and not sure if there is a way is that when I select a client and populate it on sheet two I would like the related data on that clients line from sheet one to populate to same named lines on sheet two.
if this is possible and if so provide a brief description of how it would work
View 3 Replies
View Related
Feb 2, 2013
There was an option in excel 2007 in the pivot wizard to use an existing pivot table report as the source for a new pivot. I cannot find this in Excel 2010.
View 2 Replies
View Related
Apr 2, 2014
user of excel 2010.
I have a spread sheet with 2 columns that I have applied conditional formatting to to find duplicate values. So the duplicate cells are highlighted in red now.
Problem - I want to copy only those red cells to a new column in a new tab, and am having a devil of a time figuring out. Best case would be some sort of formula I could use on the new tab&column to do this.
View 1 Replies
View Related