ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   debug code (https://www.excelbanter.com/excel-discussion-misc-queries/167532-debug-code.html)

mohavv

debug code
 
hi,

Why does this not work?

Range("D & LastRow - 3:I & Lastrow - 3").Style = "Comma"

I want to format this range underneath a table, of which the length
varies.

Cheers,

Harold

Conan Kelly

debug code
 
mohavv,

you need to adjust your qotes:

Range("D" & LastRow - 3 & ":I" & Lastrow - 3).Style = "Comma"

that should work for you.

HTH,

Conan


"mohavv" wrote in message
...
hi,

Why does this not work?

Range("D & LastRow - 3:I & Lastrow - 3").Style = "Comma"

I want to format this range underneath a table, of which the length
varies.

Cheers,

Harold





All times are GMT +1. The time now is 12:24 PM.

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