Userform to enter data in location based on value

hajiali

Well-known Member
Joined
Sep 8, 2018
Messages
624
Office Version
  1. 2016
Platform
  1. Windows
Hello Excel experts I need help with a userform to enter data based on the value type in the userform.

here is what I have.

I have USERFORM with the Following: Textbox named: ENUMBER (must be Numerical if a letter is entered to alert user only use number")
ListBox named: DATFTO ( I wish to have the dropdown list with "DAT", "FTO")
Textbox named: DAY (use MM/DD or MM/DD/YY format would prefer to have option to enter multiple number of dates separated by a comma)
CommandButton: DONE (to End Userform)
CommandButton: ENTER (enter data onto the sheet)

1596223294066.png


I have sheet "Employee List" with the Following: column B as the ENUMBERS
Range W:AU as the DAT entry
Range AY:BH as the FTO entry

Here is what I want the Userform to do:
When users enter ENUMBER
specify DAT or FTO (from DropDown List)
Enter a Dates
and presses enter

I what each Date separated by comma to be enter in the same row of the ENUMBER of Employee list sheet. if DAT is selected then date be enter Range W:AU (same row of ENUMBER) last blank column of that range.

EX: ENUMBER = 123456
DATFTO = DAT
DATE = 8/20,8/21,8/30
and entered is pressed

if sheet Employee List
CELL B130 = 123456
and if
W130 has value
X130 has value
Y130 has value
then
Cells Z130=8/20
AA130=8/21
AB130=8/30

any help is greatly appreciated. let me know if I need to clarify anything.
 
it does it for the first time row then after that the textbox2 values appear to the left of blank of row one.

for each employee number (texbox1) the values of Textbox2 need to to the right of the textbox
 
Upvote 0

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Hi Ali,
Doesn't the below line do what you need :unsure:
Set Rg = IIf(i = 1, ThisWorkbook.Sheets("Bid Data").Cells(, "C").Resize(500), ThisWorkbook.Sheets("Bid Data").Cells(, "D").Resize(, 500))
[/QUO

The above code does not. I really Need help with this. I created a new Post below if you need more clarification.

 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,728
Members
448,987
Latest member
marion_davis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top