Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Output Text in specific place


this is pretty easy question but i was wondering how do you output a
specific text in a specific place

the specific place will be determined by a variable that i previously
defined, i.e. the end of a set number of rows. the set number of rows
are variable each time, hence i need to use a variable

thanks


--
narutard
------------------------------------------------------------------------
narutard's Profile: http://www.excelforum.com/member.php...o&userid=25111
View this thread: http://www.excelforum.com/showthread...hreadid=386216

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Output Text in specific place

Cells(rwNum,"C").Value = "Some kind of text"

--
Regards,
tom Ogilvy

"narutard" wrote in
message ...

this is pretty easy question but i was wondering how do you output a
specific text in a specific place

the specific place will be determined by a variable that i previously
defined, i.e. the end of a set number of rows. the set number of rows
are variable each time, hence i need to use a variable

thanks


--
narutard
------------------------------------------------------------------------
narutard's Profile:

http://www.excelforum.com/member.php...o&userid=25111
View this thread: http://www.excelforum.com/showthread...hreadid=386216



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 692
Default Output Text in specific place

Worksheets("MySheet").Cells(rw,col).Text = "Text"
or
Worksheets("MySheet").Cells(rw,col).Text = str

where
Dim rw as Long, col as Long, str as String

--
steveB

Remove "AYN" from email to respond
"narutard" wrote in
message ...

this is pretty easy question but i was wondering how do you output a
specific text in a specific place

the specific place will be determined by a variable that i previously
defined, i.e. the end of a set number of rows. the set number of rows
are variable each time, hence i need to use a variable

thanks


--
narutard
------------------------------------------------------------------------
narutard's Profile:
http://www.excelforum.com/member.php...o&userid=25111
View this thread: http://www.excelforum.com/showthread...hreadid=386216



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Output Text in specific place

both of those raise errors since the TEXT property of a range is read only.

To the original poster, if you need to write on a sheet that is not the
active sheet, then you can qualify your reference with the worksheet name
(if you are writing to the activesheet, you can omit the worksheet
qualification or use ActiveSheet)

Dim rwNum as Long
rwNum = 21
worksheets("Sheet1").Cells(rwNum,"C").Value = "Some kind of text"

or
Dim rwNum as Long, colNum as Long
rwNum = 21
colNum = 3
worksheets("Sheet1").Cells(rwNum,colNum).Value = "Some kind of text"


The value can be a variable as well.
Dim rwNum as Long, colNum as Long
Dim sStr as String
rwNum = 21
colNum = 3
sStr = "Some kind of text"
worksheets("Sheet1").Cells(rwNum,colNum).Value = sStr

--
Regards,
Tom Ogilvy



"STEVE BELL" wrote in message
news:w3AAe.39948$ZN6.971@trnddc02...
Worksheets("MySheet").Cells(rw,col).Text = "Text"
or
Worksheets("MySheet").Cells(rw,col).Text = str

where
Dim rw as Long, col as Long, str as String

--
steveB

Remove "AYN" from email to respond
"narutard" wrote

in
message ...

this is pretty easy question but i was wondering how do you output a
specific text in a specific place

the specific place will be determined by a variable that i previously
defined, i.e. the end of a set number of rows. the set number of rows
are variable each time, hence i need to use a variable

thanks


--
narutard
------------------------------------------------------------------------
narutard's Profile:
http://www.excelforum.com/member.php...o&userid=25111
View this thread:

http://www.excelforum.com/showthread...hreadid=386216





Reply
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
Hyperlink to a specific place in a document Al Excel Worksheet Functions 3 June 29th 09 05:53 PM
Need to remove text in specific place Scott Excel Worksheet Functions 4 October 6th 08 07:19 PM
If statement to output specific text if 2 criteria are met? mcmilja Excel Discussion (Misc queries) 1 June 4th 08 10:32 PM
lookup specific character place Budwho Excel Worksheet Functions 6 July 20th 05 06:59 PM
Referencing cells text output if it meets specific conditions Chersie Excel Worksheet Functions 3 April 18th 05 04:34 PM


All times are GMT +1. The time now is 12:48 AM.

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

About Us

"It's about Microsoft Excel"