LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Variables in a cell reference

I would like to know how I could combine cells with variables if possible.
Something similar to the Selection.Value Selection.Value = B1& C1
line in the code below but which operates like (x,2)&"" ""&(x,3) so I can
get the appropriate cells to add together with a space in between.

I am likely mixing syntax as I am unfamiliar with VB.
Sub Ne()
Dim y As Integer
Dim x As Integer
Cells(4, 10) = "=COUNTA(A:A,"" * "")-1"
y = Cells(4, 10)
For x = 1 To y
Cells(x, 1).Select
Selection.Value = B1& C1
Next x
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
Reference a file by concatenating cell variables Michael Excel Worksheet Functions 13 October 24th 08 09:54 PM
Syntax for using variables in a cell formula to reference paths/fi colorado808 Excel Worksheet Functions 4 March 15th 07 03:41 AM
using variables to reference sheets marksince1984[_5_] Excel Programming 6 June 15th 06 11:29 PM
Vary variables in a formula via reference to another cell Peter Excel Discussion (Misc queries) 2 July 21st 05 07:19 PM
Using variables to reference columns in VBA aktiv Excel Programming 3 May 24th 04 04:46 AM


All times are GMT +1. The time now is 11:53 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"