Set cell not showing value

ThomasOES

Board Regular
Joined
Aug 29, 2017
Messages
174
I want to show c.Value in the set Range elrepcol.
elrepcol remains blank.
How to show c.Value in the cell?

Code:
[FONT=Verdana]For Each c In ActiveSheet.Range(("D131"), _
        Range("D131").Offset(, 40).End(xlToLeft)) _
        .Cells
Set elrepcol = Range("AK1").End(xlToLeft).Offset(, 1)
elrepcol = c.Value[/FONT]
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
What exactly are you trying to accomplish?
 
Upvote 0
There's actually a lot of code between the For and set statements.
I need to label a column of data the value in the original range.
the elrepcol is shorthand for element report column.
Beneath that label will be several rows of concentrations of an element.

I'll use elrepcol as a reference point to fill cells below with data.

It will look like

Al
0.25
0.52
0.35
 
Upvote 0
I'm non the wiser, are you trying to put the values from row 131 in row 1?
Please remember that I cannot see what data looks like and have no idea what you are trying to do with it.
 
Upvote 0
The code below is working, but its a bit crude

Code:
[FONT=Verdana]Set elrepcol = Range("AK1").End(xlToLeft).Offset(, 1)
elrepcol.Select
ActiveCell.Value = c.Value[/FONT]

If I could simply use

Code:
[LEFT][COLOR=#222222][FONT=Verdana]elrepcol.value = c.value[/FONT][/COLOR][/LEFT]

would be perfect, but it returns error
 
Last edited:
Upvote 0
What is the error message & number?
 
Upvote 0
Glad you fixed it & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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