ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to access column 8 in my Range (https://www.excelbanter.com/excel-programming/411307-how-access-column-8-my-range.html)

rpsmith123

how to access column 8 in my Range
 
Hi,

I want to place "1" in column 8 in every row in my range named
"LegendList". How do I do this?

I tried:

LegendList(, 8) = "1"

and I tried

With LegendList
.Cells(, 8) = "1"
end with

Neither works...
Help...please
Thanks,
Paul

Norman Jones[_2_]

how to access column 8 in my Range
 

Hi Paul,

Try:

Range("LegendList").Columns(8).Value = 1



---
Regards.
Norman

"rpsmith123" wrote in message
...
Hi,

I want to place "1" in column 8 in every row in my range named
"LegendList". How do I do this?

I tried:

LegendList(, 8) = "1"

and I tried

With LegendList
.Cells(, 8) = "1"
end with

Neither works...
Help...please
Thanks,
Paul



JW[_2_]

how to access column 8 in my Range
 
On May 21, 12:35*pm, rpsmith123 wrote:
Hi,

I want to place "1" in column 8 in every row in my range named
"LegendList". How do I do this?

I tried:

LegendList(, 8) = "1"

and I tried

With LegendList
* *.Cells(, 8) = "1"
end with

Neither works...
Help...please
Thanks,
Paul


If LegendList is a named range in your workbook, which I'm assuming it
is, you need to reference it using Range. Something like this.
Range("legendlist").Cells(, 8) = "1"


All times are GMT +1. The time now is 10:08 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com