Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Hyperlink to a specific place in a document | Excel Worksheet Functions | |||
Need to remove text in specific place | Excel Worksheet Functions | |||
If statement to output specific text if 2 criteria are met? | Excel Discussion (Misc queries) | |||
lookup specific character place | Excel Worksheet Functions | |||
Referencing cells text output if it meets specific conditions | Excel Worksheet Functions |