LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
lashio
 
Posts: n/a
Default Selecting a column with an integer

Sub ColumnSelection()
' Selecting a column with an integer
' Please show me how to eliminate the use of Cells(1, 1)
Dim r As Integer
Dim c As String
Dim numericcolumn As Integer
Dim alphabetcolumn As String

numericcolumn = 4 ' in practice 4 is the
resultant of an equation
alphabetcolumn = "=CHAR(" & numericcolumn + 64 & ")"
Cells(1, 1) = alphabetcolumn ' I like to eliminate the use of
Cells(1, 1)
c = Cells(1, 1).Value ' I like to eliminate the
use of Cells(1, 1)
Cells(1, 1) = "" ' I like to eliminate
the use of Cells(1, 1)
Columns("" & c & ":" & c & "").Select
End Sub


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I sort by row instead of by column? PercivalMound Excel Worksheet Functions 7 August 28th 06 10:41 PM
Format cell in column B based on value in the next cell (column c) Nicole Excel Discussion (Misc queries) 7 May 18th 05 10:19 PM
How do I reference every "n" cell in a column in Excel? Alma Excel Worksheet Functions 2 March 22nd 05 06:19 PM
Formula for a column comicfly Excel Discussion (Misc queries) 2 March 11th 05 12:16 PM
Copying the contents of a column into a chart Richard Excel Worksheet Functions 1 November 16th 04 02:39 PM


All times are GMT +1. The time now is 02:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"