Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,670
Default How can I set up a dynamic data entry form?

Hi everyone.

I am trying to create a form on Excel that does the following:

The user enters a piece of data unto 3-4 columns. The user then hits a
function start key. The data is then stored in a different sheet using the
next available line. I do not know VB except for BASIC Macros.

I tried creating a counter using the "counta" function. This worked. I
then created a Macro to cut and paste this value on the "Go to" command but
the issue there was it did not update the new value and always went to the
first cell that I originally selected.

Any thoughts how to do this in an uncomplicated way?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default How can I set up a dynamic data entry form?

This should give you what you want:
Sub ExportDatabaseToSeparateSheets()
'Export is based on the value in the desired column
Dim myCell As Range
Dim mySht As Worksheet
Dim myName As String
Dim myArea As Range
Dim myShtName As String
Dim KeyCol As Integer

myShtName = ActiveSheet.Name
KeyCol = InputBox("What column # within database to use as key?")

Set myArea = ActiveCell.CurrentRegion.Columns(KeyCol).Offset(1, 0).Cells

Set myArea = myArea.Resize(myArea.Rows.Count - 1, 1)

For Each myCell In myArea
On Error GoTo NoSheet
myName = Worksheets(myCell.Value).Name
GoTo SheetExists:
NoSheet:
Set mySht = Worksheets.Add(Befo=Worksheets(1))
mySht.Name = myCell.Value
With myCell.CurrentRegion
.AutoFilter Field:=KeyCol, Criteria1:=myCell.Value
.SpecialCells(xlCellTypeVisible).Copy _
mySht.Range("A1")
mySht.Cells.EntireColumn.AutoFit
.AutoFilter
End With
Resume
SheetExists:
Next myCell

End Sub


Regards,
Ryan--

--
RyGuy


"Eric" wrote:

Hi everyone.

I am trying to create a form on Excel that does the following:

The user enters a piece of data unto 3-4 columns. The user then hits a
function start key. The data is then stored in a different sheet using the
next available line. I do not know VB except for BASIC Macros.

I tried creating a counter using the "counta" function. This worked. I
then created a Macro to cut and paste this value on the "Go to" command but
the issue there was it did not update the new value and always went to the
first cell that I originally selected.

Any thoughts how to do this in an uncomplicated way?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Form for data entry Lin Light Excel Discussion (Misc queries) 2 October 9th 07 06:01 PM
Data Entry Form Brian T Excel Discussion (Misc queries) 8 March 5th 07 02:23 PM
Data Entry Form Bethany L Excel Worksheet Functions 0 February 20th 06 06:23 PM
data entry form Excel Aart Dijkzeul Excel Discussion (Misc queries) 1 September 25th 05 01:57 PM
data entry form Tess Excel Discussion (Misc queries) 0 March 2nd 05 03:43 PM


All times are GMT +1. The time now is 11:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"