Hi friends,
My friend had given me a problem in excel of copy row whenever the values changed to another sheet next available row.
I have come-up with this following code
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Target, Target.ActiveSheet.Range("A1:D1")) Is Nothing Then
Application.EnableEvents = False
Application.ScreenUpdating = False
MsgBox ("Hi")
Call ValueChange
Application.EnableEvents = True
End If
End Sub
Sub ValueChange()
Dim lastrow As Long
lastrow = Sheets("Sheet2").Range("A65536").End(xlUp).Row + 1
Sheets("Sheet2").Range("A" & lastrow & ": D" & lastrow).Value = Sheets("Sheet1").Range("A1:D1").Value
End Sub
Hope it will help you.
Note:
Please share your valuable comments and feedback to psrdotcom@gmail.com
Showing posts with label values. Show all posts
Showing posts with label values. Show all posts
August 10, 2018
February 06, 2016
Microsoft Excel Select a value from a predefined list of values with dropdown option to validate the data
Hi friends,
When I was preparing a sheet by referencing some pre-defined names as list to a field/cell. I was thinking the feature of Microsoft Excel dropdown list. After exploring the option and using, I thought of sharing with you all.
Objective: Selecting a cell value from a list of pre-defined values
Procedure:
When I was preparing a sheet by referencing some pre-defined names as list to a field/cell. I was thinking the feature of Microsoft Excel dropdown list. After exploring the option and using, I thought of sharing with you all.
Objective: Selecting a cell value from a list of pre-defined values
Procedure:
- Open blank excel workbook
- Prepare you template with headers
- Create a new sheet and rename it. Ex: "Names"
- Enter the values from Column A from cell A1 in vertical direction
- Don't use any other columns
- Don't leave any empty cell in between the values
- Leave first cell as empty, if you want to include the empty option in a dropdown
- Select the cell which contains the values
- Right click and choose the option "Define Name"
- Give a name to the list of values. Ex: NamesList
- Click on "OK" button
- Now, move to the sheet where we want to use the list of names as a dropdown option
- Select the cell(s), where we want to have the dropdown list
- Click on "Data" Menu
- From "Data Tools" ribbon, click "Data Validation" from "Data Validation" submenu
- In Settings tab, Validation Criteria section, for the option Allow, select "List"
- Choose the options
- Ignore blank: Ignore when user no selected any option
- In-cell Dropdown: Show the dropdown list in cell
- In "Source" field, type the defined name for the list preceded with = (Equal to) symbol. Ex: =NamesList
- Now, you should be able to see the dropdown with empty values
- Select the predefined values from the dropdown list of names.
Subscribe to:
Posts (Atom)
Featured Post
Java Introdcution
Please send your review and feedback to psrdotcom@gmail.com
-
Hi all, I spent 2 days on configuring this. I read lot of blogs and instrutction steps from various sites. I would like share my experienc...
-
Hi folks, Today we will see how we can get the folder path of the windows user specific app data for storing any program (app) based inform...
-
For the academic purpose i had written a small program in Matlab. I have tried encoding and decoding the image by using Huffman coding. ...