Macro VBA Code To Allow Data Entry In Few Cells

May 21, 2014

I have an excel spread sheet with the page title "Main". I would like to add a macro by pushing a button and a window pops up. It will have 4 columns or 4 questions. The first question will ask what is the date? You enter date, next question asks, What is the fundamental? You enter the fundamental. Next question is what is your name? you enter name and next question is enter what you need fixed. Once you enter that and press finished, the data is then place in the spreadsheet. All rows shift down 1 spot. B2 answer is posted in B2, question 2 answer is placed in C2, question 3 answer is placed in D2 and question 4 is answered in E2.

Each time someone presses the NEW ENTRY button this window pops up asking these 4 questions. The answers are then posted in cells B2 through E2 after shifting the entire page down 1 row.

View 2 Replies


Code Data Entry Form

Oct 10, 2007

i have some data and i want search a record by two fields ("hsc and section") with in my data and i want to edit the remaining fields.

the fields of record are "hsc, section, amt, bcrc, date, prno"

View 6 Replies View Related

VBA Code For Missing TextBox Data Entry?

Aug 6, 2012

This code repeats for each of my 18 UserForm TextBoxes. Is there a better way?

If Trim(Me.TextBox4.Value) = "" Then
MsgBox "Enter a Score for #1"
Exit Sub
End If

View 5 Replies View Related

Macro Code To Add New Sheet And Rename With Data Given In Cells

Feb 11, 2014

I need a macro code to add and rename sheets as per data given in column "A".

ie if column A has

4 new sheets to be created with name given above (Column A). PS:- the data given in column A will not be limited to 4 rows, it ll be > or < 4.

View 9 Replies View Related

Convert Formula To Macro Code (combining Data From Two Cells)

Jul 28, 2009

I received assistance from NBVC for combining data from two cells. Post I need to convert the formula into macro code. I thought I would be able to convert it on my own, but running into some troubles with run time errors. Here is the Excel formula, which is working fine.

View 5 Replies View Related

VBA If Range Value = Something AND Another Cell Has No Entry- Prompt The User To Enter Data- My Code Is Not Working

Apr 20, 2009

I am trying to display a message box for the user if there is "agency" in cell o8 but nothing in p8... I tried the following code but it doesnt work..

If Range("o8").Value = "Agency" And Range("p8").Value = "" Then

MsgBox "Please provide name of agency in cell p8"

Sheet9.Shapes("cross").Visible = True


View 9 Replies View Related

Macro To Move Data From Data Entry Update Master Sheet Using Formula To Allocate

May 12, 2013

I am working on a project and would like to see if there is a solution for it. i have a workbook that has data entry that is summarized at a master level but I need to automatically use a formula to update another sheet after clicking an udpate button. The data from the data entry sheet needs to be allocated to all the lines that has the same master item based on the formula. A test workbook is attached ...

View 1 Replies View Related

Lock Certain Cells To Allow Data Entry But Not Allow Data To Be Removed

Apr 23, 2013

is there a way to lock certain cells to allow data entry but not allow data to be removed.

View 2 Replies View Related

Limit Data Entry In Cells To Y Or N

Feb 26, 2009

I want to limit data entry in a range of cells to Y or N (Upper Case)

I have tried data validation, list, but this still allows y or n, I want just Y or N

View 3 Replies View Related

Looping Data Entry Macro

Sep 26, 2008

I want to use a piece of VBA to copy values from cells A1, C1, E1, and G1 and paste them into the next blank cell in an existing range called "DCopy". I am trying to use the following code, but as I have never tried writing a looping macro, have no idea what I am doing:

View 2 Replies View Related

Macro To Comment On Cells Based On Formula's (duplicate, Length, No Entry)

Jun 25, 2009

making a macro that will scan for duplicates, length & empty cells.

I have the sample file below that does conditional formatting but it doesnt help as much because I want to show the reason for the highlight's on a comment instead.

sample file : [url]

file that might help out: [url]

checks would be:
column A - duplicates and/or length should not be over 100 characters
column B - duplicates
column F - should only contain 2 comma's(or 3 keywords)
all columns - check if no entries are found(empty cells)

View 9 Replies View Related

VBA To Lock Cells After Data Entry And Save

Aug 13, 2013

I need the attached spreadsheet to lock cells after data is entered into cells E13-G74 and the page saved. It will be opened twice daily and saved. Also im not sure if it makes a difference but I would like all other cells outside this range locked except for C5, C6, C7 AND C8. I have seen several threads on the topic but am extremely new to using VBA and cannot make anything work.

View 6 Replies View Related

Locking Cells Upon Entry Of Specific Data

May 14, 2009

I'm creating a spreadsheet for work, which for security reasons requires certain information to be locked except to administrators. However the cells need to be open for inputing information for everyone until the administrator enters specific data.

Completed Date Time W/R No. Acc. No. Priority? Vunerable? Comments Closed Date/Time Yes 14/04/09 11:30:00 1234567890 8890976 Yes Yes N/A 14/04/2009 11:30

What I am looking to happen is once an adminstrator selects 'Yes' from the drop down menu on the Completed column, for that row of data to be locked for editing, unless unlocked later by an adminstrator.

View 9 Replies View Related

Tranferring Variable Entry From Form Entry To Macro

May 1, 2009

I used a form with textboxes for data input for one of my vb macros. Currently I have the private sub from the form transfer those entries to a remote cell on the spreadsheet, (like in column "HZ"), so that the macro that will actually utilize them can retrieve them. Is there a way to pass that data directly from what is entered in the form in the textboxes to the macro that will actually use them?

View 4 Replies View Related

Stopping Data Entry If Adjacent 5 Cells Are Blank

Feb 10, 2009

I've got six columns with drop-down lists in every cell. I don't want column six to be selectable if the first five drop downs don't have data in them too.

Equally, I want the data in column six to be undone if columnns 1-5 are then unselected. Can I do this?

I know that using data validation or VBA is an option but I'm not sure exactly how to set it up this way. I also don't want anyone screwing with what can and can't be entered according to these rules - I want to keep it watertight!

View 9 Replies View Related

Macro To Transpose Data Into Journal Entry Format

May 4, 2012

Transaction #Transaction DescriptionAccountDate (XX/XX/XX)DesciptionABCDEFG10/24/2015Cash Held(3404.00)3404.00 0.00 0.00 50.00 0.00 (50.00)10/25/20152Cash not Held0.00 (9707.00)9707.00 0.00 (60.00)60.00 0.00 10/26/2015Cash Held0.00 (7402.00)0.00 7402.00 0.00 0.00 0.00 10/27/20154Transfer to Bank 0.04 0.00 (50.04)0.00 50.00 0.00 0.00 10/28/20155Transfer of Cash0.00 4208.00 0.00 (4208.00)0.00 0.00 0.00

I am trying to make a macro that will turn transpose the above data into the below data.

DateDescriptionAccountAmount10/24/2015Cash HeldA-340410/24/2015Cash HeldB340410/24/2015Cash HeldE5010/24/2015Cash HeldG-5010/25/2015#2 Cash not HeldB-970710/25/2015#2 Cash not HeldC970710/25/2015#2 Cash not HeldE-6010/25/2015#2 Cash not HeldF6010/26/2015Cash HeldE-740210/26/2015Cash HeldG7402

Basically each non-zero number in the accounts (A through G) need to have their own row with the account name from their appropriate column and the date and description in their appropriate row. So as you can see each account A,B,E,and G get the amount -3404, 3404, 50, and -50 in their own row and get the appropriate descipion of 'Cash Held' and Date '10/24/2015'. Then the macro would move onto the next row and do the same thing.

Also if there is a way to tack in front of the description the transaction # (if there is one) ie. #2 Cash not Held. I really don't even know where to start.

View 9 Replies View Related

Macro For Data Entry That Checks For Duplicate Record

Dec 31, 2013

I have a spreadsheet that uses a Form for Data entry. Each record has ID, Name, State, and about 20 more columns of information for each ID.

The data entry is working well.

What I need now is to add a check for a UNIQUE ID. If they are adding a new record I need my form to return a message if the ID they use is already in the database. So if they enter XXXXX and that is in the file already - they should get a message that XXXXX is already in the database and to please enter a new ID.

And once they fix XXXXX to XXXXY then the record is added.

I should add that the ID is stored in column A.

View 3 Replies View Related

VBA Code To Move Data From Entry Sheet To Historical Sheet By Date

Apr 17, 2014

In the attachment you will see an example of what I am trying to accomplish. What I am trying to do is find VBA code that will move data by date from an (Entry) sheet to a (Historical) sheet. I want to enter a date in B3 on the (Entry) sheet. I then enter data into C3. What I would like to happen is when the data is entered into C3 the sheet goes and finds the same date that I entered in B3 and copies that data from C3 into Column E of the (Historical) sheet.


View 5 Replies View Related

Code To Move Data From Entry Table To Historical Table By Date

Mar 14, 2014

In the attachment you will see an example of what I am trying to accomplish. What I am trying to do is find VBA code that is either specific to this worksheet or in a macro. When the sheet is opened I enter a date in B2. I then enter data into A7, B7, and C7. What I would like to happen is when the data is entered into A7, B7, and C7 the sheet goes and finds the same date that I entered in B2 and copies that data from A7, B7, and C7 into F7, G7, and H7.

View 2 Replies View Related

Auto Copy Template On Record Entry & Link Set Cells Back New Record Entry Sheet

May 26, 2009

I am looking to create a macro that will create a new sheet when data is added on a summary sheet. Example.

1. Summary sheet called "Variations" contains columns that will contain the information needed for new sheet (Columns A to D)

2. When data is entered on "Variations" sheet: Column B, then macro automatically creates new sheet renamed to e.g. VO1 (Number used on "Variations" tab) and is a copy of "Master" tab.

3. Data entered in Column A to D on "Variations" tab is automatically entered onto new sheet created (e.g VO1). Shown is blue on attached file. Additional data is updated on "VO1" sheet and this then links back to "Variations" tab

View 6 Replies View Related

Zip Code Entry

Jan 26, 2010

I would like to have a column for ZIP codes and some of them have the full ZIP code 5+4 digit extension and some are just the first 5 digits.

Is there a way to have it auto format with the "-" between the main ZIP and the extension? If I use the special format and select the ZIP+4 option, then the standard 5 digit entries will have a preceeding 4 zeros to complete the full zip code entry.

View 9 Replies View Related

Date Entry Using VBA Code

Dec 31, 2008

I am not sure how many questions I can ask in one day, but I have one more. I am using VBA code for easy date and time entry on a spreadsheet...I am a complete novice at this.

I need to add additional columns to the range for dates and times.
also, is it OK to use the code for date and time on the same worksheet?

Code for Date:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)

Dim DateStr As String

On Error GoTo EndMacro
If Application.Intersect(Target, Range("A2:A100")) Is Nothing Then
Exit Sub
End If
If Target.Cells.Count > 1 Then
Exit Sub
End If
If Target.Value = "" Then
Exit Sub
End If

View 9 Replies View Related

VBA Code To Subtract Data In 7 Paired Cells To Be In New Cells

Jun 6, 2013

My data is like this



now i want after the last data column to put formula "= ROUND((C2-D2)/100000,2)" in S2 similary "= ROUND((E2-F2)/100000,2)" in T2 using VBA till all data colimns upto column R are used in subsequent columns

I tried following code

Sub tot()
' This subtracts credits from debits and divides by 100000
Application.Goto Reference:=Range("s4")
Dim dr, cr, clmn, ansclmn, cln As Integer
For ansclmn = 19 To 26


View 1 Replies View Related

Auto Fill Off Of Zip Code Entry

May 19, 2009

If I have 3 fields: zip code, city and state; is there a way where I can have the user of my form enter their zip code and it will populate both city and state. I have the data, I just dont know exactly how to code it.

View 9 Replies View Related

Code To Find The First And Last Duplicate Entry

Aug 10, 2009

i need to identify the first and last duplicat entrys and delete all rows in between.
eg keep row 275 and 277 and delete row 276 all duplicates only in column C ..

View 9 Replies View Related

Code To Format Date Entry

Jun 9, 2006

I have a macro which is designed to collect information and then assign each piece of information to a defined cell. I have Dim statements for each piece of information i.e.

Dim Info1 = Surname
Dim Info2 = Initials And so on.
Dim Info11 = Date of entry

This is working perfectly but the date when entered is reversing to american format. 08/05/2006 becomes 05/08/2006. Type into the cell manually and it works perfectly let the macro put the date in and it changes format. Can anyone supply a line of code that would format the date to dd/mm/yyyy? Then I could insert it after the part of my code which basically says go to this cell and put in the date.

View 3 Replies View Related

VBA Code To Unhide A Row When A New Entry Is Copy And Paste

Apr 26, 2014

I have 4-5 worksheets (sheet1,sheet2,etc) on a workbook. All of the rows except for the ones that are filled in are currently HIDDEN.

I have one worksheet called "Add record" which has a VBA code that adds a record to any of these sheets.

When it does this I want it to recognise when pasting the new record into any fo the sheets.. IF the row is hidden, the sheet needs to reveal that row.

I'm desperate trying to get this to work!!

Here is the code I have so far! This is a command button macro used in the "Add Record Sheet" I have FOUR different versions of this code. Each one adds the data to a specific sheet.

[Code] .....

View 1 Replies View Related

Format Canadian Postal Code On Entry

Feb 5, 2007

I can't find a custom format to validate a properly formatted Canadian postal code on entry, so I think my last hope is to ask someone to write me a VBA code.

Canadian postal codes consist of six characters with a space in the middle: a capital letter, a number, a capital letter, a space, a number, a capital letter, and a number.

Therefore, M2A 3J4 is a properly formated postal code.

I want a code to fix an improperly fomatted postal code (such as M2A3J4 or m2a3j4 or m3a 2j4) on entry.

View 14 Replies View Related

Execute Code Based On Cell Entry

Oct 28, 2009

I would like to write the code or create a macro that will execute when the value of a range of cells is greater than null. The macro or code that I would like to execute will UNHIDE a group of consecutive rows.

View 14 Replies View Related

VBA Code For Highlight Today And Yesterday Entry

Feb 3, 2012

I have a sheet where i enter values daily i want those entry who enter today and yesterday Highlighted.


View 4 Replies View Related

Copyrights 2005-15, All rights reserved