# Populating 30 userform labels from 10 rows, 3 columns data

#### jdesi

##### New Member
In sheet1 I'm keeping a list of values that I want to display in a userform, with 10 "rows" of data. I have the userform labels set up so that
label11 corresponds to what's in A1 aka cells(1,1)
label12 corresponds to what's in B1 aka cells(1,2)
label13 corresponds to what's in C1 aka cells(1,3)
label21 corresponds to what's in A2 aka cells(2,1)
etc
through label103... for C10 / cells (10,3)

I know how to assign values from sheet1 to userform1.label1 by brute force / having trouble figuring out how to reference the labels programmatically, e.g. the nonsensical syntax below:

for R = 1 to 10
for C = 1 to 3
UserForm1.LabelRC = Cells(R,C)
next C
next R

any help with how to refer to the userform labels would be greatly appreciated

### Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

#### chiello

##### Well-known Member
Re: Populating 30 userform labels from 10 rows, 3 columns da

jdesi, the following code should work for you...

For R = 1 To 10
For C = 1 To 3
UserForm1.Controls("Label" & R & C) = Cells(R, C)
Next C
Next R

Ciao

#### jdesi

##### New Member
Re: Populating 30 userform labels from 10 rows, 3 columns da

grazie. chiello

Replies
6
Views
737
Replies
6
Views
343
Replies
0
Views
207
Replies
2
Views
414
Replies
2
Views
310

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,152,579
Messages
5,770,960
Members
425,653
Latest member
UNSING

### 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?

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