Transfer data from user form to sheet

jimpatel1993
2StarLounger
Posts: 153
Joined: 31 Jan 2021, 09:12

Transfer data from user form to sheet

Post by jimpatel1993 »

Thanks for looking at my post.

I have userform and i wanted to transfer some data from userform to the sheet1 please

When user select a, demand as "This month", I wanted to add Total time + Longest minus shortest answer (in this case it is standard for all partnumbers but it will change in my actual sheet)

I have attached different scenario with expected solution for query 1 and 2 as well.

That is for all solutions, i wanted to transfer unique frame1 selection from userform to "sheet1" P1 and Q1.

For scenario 2, I have selected same frame in the userform a but Total time + Longest minus shortest answer is different. So i wanted to keep P1 as same but just change Q2

For scenario 3, I have selected frame a and b and Total time + Longest minus shortest answer should be moved to P1,P2,Q1 and Q2 as shown in scenario 3 solution please.

Again for scenario 3, if Total time + Longest minus shortest changes it should change only in Q1 and Q2 and so on

End expection is i wanted to transfer data from Frame1 when ever it changes to P1,P2 and so on (note: I have 1000s of frame1 in my actual sheet) and its corresponding frame2 to Q1,Q2 and so on

Really thanks for your help
You do not have the required permissions to view the files attached to this post.

jimpatel1993
2StarLounger
Posts: 153
Joined: 31 Jan 2021, 09:12

Re: Transfer data from user form to sheet

Post by jimpatel1993 »

Unfortunately I can't attach more in the first query. So I am attaching more scenarios here

Thanks
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Transfer data from user form to sheet

Post by HansV »

What is the purpose of the line

Code: Select all

    TextBox3 = Evaluate("=SMALL(('Labour time'!" & Rng.Address & "),1+FREQUENCY(('Labour time'!" & Rng.Address & "),0))")
It causes an error on my computer.
Best wishes,
Hans

jimpatel1993
2StarLounger
Posts: 153
Joined: 31 Jan 2021, 09:12

Re: Transfer data from user form to sheet

Post by jimpatel1993 »

Is it
I don't know why it's causing an error
This line is for calculating smallest number if I am not wrong

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Transfer data from user form to sheet

Post by HansV »

I don't understand the role of the list box. The current code you have makes no sense...
Best wishes,
Hans

jimpatel1993
2StarLounger
Posts: 153
Joined: 31 Jan 2021, 09:12

Re: Transfer data from user form to sheet

Post by jimpatel1993 »

Sorry Hans for late reply.
I got stuck with some work and sorry for late reply.
I will explain with some other examples with clear logic in my next post
Sorry hans
Thanks for your time and sorry for misunderstanding