ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Purpose of EntireRow and EntireColumn (https://www.excelbanter.com/excel-programming/329405-purpose-entirerow-entirecolumn.html)

Mike NG

Purpose of EntireRow and EntireColumn
 
Excel allows me to do something like
Columns(liColNum).ColumnWidth = cCellWidth

but after much googling I find out to change the font I need to use
something like
Cells(1, liRowNum).EntireColumn.Font.Size = 12

Why on earth is it designed like this.
--
Mike

Tom Ogilvy

Purpose of EntireRow and EntireColumn
 
Cells(row,column) is for refering to a single cell

Columns(index) is for refering to a whole column

EntireColumn is a bridge between.

What is illogical about it?

Illogical is using a variable like liRowNum to refer to the column <g

Columns(liRowNum).font.Size = 12

should work fine for an entire column

Cells(1, liRowNum).Font.Size = 12

should work fine for a single cell.

--
Regards,
Tom Ogilvy

"Mike NG" wrote in message
...
Excel allows me to do something like
Columns(liColNum).ColumnWidth = cCellWidth

but after much googling I find out to change the font I need to use
something like
Cells(1, liRowNum).EntireColumn.Font.Size = 12

Why on earth is it designed like this.
--
Mike




Mike NG

Purpose of EntireRow and EntireColumn
 
On Sat, 14 May 2005 at 22:19:03, Tom Ogilvy (Tom Ogilvy
) wrote:
Cells(row,column) is for refering to a single cell

Columns(index) is for refering to a whole column

EntireColumn is a bridge between.

What is illogical about it?

For some reason
Columns(liRowNum).font.Size = 12
wasn't working for me last night. Obviously a syntax error, but it was
appearing to me that I had to use EntireColumn rather than Columns



Illogical is using a variable like liRowNum to refer to the column <g

It was 3 am local time and my concentration going


Columns(liRowNum).font.Size = 12

should work fine for an entire column

Yes it does thanks. Now I just need to set the font to "Courier New".
Hopefully will be OK with that
--
Mike


All times are GMT +1. The time now is 02:57 AM.

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