Checking user input and copying/pasting it to another worksheet

Darmlucht

New Member
Joined
Nov 23, 2017
Messages
26
So, my second post is a 'sequel' to my previous post

I have this user input, UserId.Text , that is being checked to see if it exists on a certain sheet.
I have a sheet named Users, with columns ID(unique), Name and Sirname.
And I have a sheet where all the 'events' should be stored.

So you fill in your ID, and hit a button.
It checks whether the ID exists in the list on the Users-sheet. If it doesn't exist there=>Exit
It it exists, it pastes the ID from the userinput to the 'events' sheet.
But now, I would like to have also the corresponding name/sirname pasted to this 'events'sheet.

So UserId is in ColumnA, Name is columnB and sirname is Column C, starting from Row 2
So let's say
[TABLE="width: 500"]
<tbody>[TR]
[TD]User ID[/TD]
[TD]Name
[/TD]
[TD]Sirname
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]VanAs
[/TD]
[TD]Karel
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]DenTurk
[/TD]
[TD]Bert
[/TD]
[/TR]
</tbody>[/TABLE]

So if the user-input for UserID.Text = 1, then on the 'events'sheet, it should make a new line
with
[TABLE="width: 500"]
<tbody>[TR]
[TD]1
[/TD]
[TD]VanAs
[/TD]
[TD]Karel
[/TD]
[/TR]
</tbody>[/TABLE]

But only based on the user input.

I hope, again, my question is clear.
And I hope your answers will be as well:)
If it's desired, I will post my code, maybe it's more clear then.

Thanks in advance!
Kind regards
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Is no one in the knowing of this?
Or is everybody just writing code like a maniac?
I'm trying my best to find it myself, but to no avail..
 
Upvote 0

Forum statistics

Threads
1,224,816
Messages
6,181,141
Members
453,021
Latest member
Justyna P

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