Userform to enter data in location based on value

hajiali

Active Member
Joined
Sep 8, 2018
Messages
304
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.
 

hajiali

Active Member
Joined
Sep 8, 2018
Messages
304
Office Version
  1. 2016
Platform
  1. Windows
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
 

Some videos you may like

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

hajiali

Active Member
Joined
Sep 8, 2018
Messages
304
Office Version
  1. 2016
Platform
  1. Windows
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.

 

Watch MrExcel Video

Forum statistics

Threads
1,114,084
Messages
5,545,867
Members
410,711
Latest member
Josh324
Top