Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 49946

[SOLVED] Convert Column Number to Letter VBA

$
0
0
Hi All,

I believe this should be fairly simple, but i just cannot put my finger on what to do. I am trying to get a column number reference to be its corresponding letter.

Here is the chunk of my code, obviosly the highlighted part is not working properly as of right now because my column is being referenced as a number. Is there some easy way to go about changing this without using mod or anything else. I am looking for a quick fix. Thanks for any help.

Code:

lRowPT = Cells(.Rows.Count, 1).End(xlUp).Row
lColumnPT = Cells(2, Columns.Count).End(xlToLeft).Column
Range("A2:" & lColumnPT & lRowPT).Copy


Viewing all articles
Browse latest Browse all 49946

Trending Articles