Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 161
Default Displaying the value of a string

Hi,

I am not a programmer, so apologies if I don't use the correct terms here -
hope it makes sense!

I have a piece of code that uses a string (Dim Storage As String)to store
text concatenated from a series of cells.

What I now want to do is display the concatenated text in a single cell.

I have tried to use:

Range("A1").Value = Storage

But this doesn't actually display the text held in Storage in cell A1. When
I select the cell, it remains blank, but the Formula bar shows that correct
value is associated with the cell.

Any suggestions on how I move the text value of Storage into A1?

This is in Office 2007 under Vista, if that's of any importance.

TIA

Dave
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Displaying the value of a string

this works for me

Option Explicit
Sub test()
Dim Storage As String

Storage = Range("b2").Value & Range("c2").Value & Range("d2").Value & _
Range("e2").Value
Range("a1").Value = Storage

End Sub

--


Gary


"Risky Dave" wrote in message
...
Hi,

I am not a programmer, so apologies if I don't use the correct terms here -
hope it makes sense!

I have a piece of code that uses a string (Dim Storage As String)to store
text concatenated from a series of cells.

What I now want to do is display the concatenated text in a single cell.

I have tried to use:

Range("A1").Value = Storage

But this doesn't actually display the text held in Storage in cell A1. When
I select the cell, it remains blank, but the Formula bar shows that correct
value is associated with the cell.

Any suggestions on how I move the text value of Storage into A1?

This is in Office 2007 under Vista, if that's of any importance.

TIA

Dave



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 161
Default Displaying the value of a string - SOLVED!

Gary,

Thanks for the prompt respone. Just realised I was being stupid.

The output cell was actually merged with loads of others and the value was
being displayed at the bottom off the cell - below the bottom of the screen!

"Gary Keramidas" wrote:

this works for me

Option Explicit
Sub test()
Dim Storage As String

Storage = Range("b2").Value & Range("c2").Value & Range("d2").Value & _
Range("e2").Value
Range("a1").Value = Storage

End Sub

--


Gary


"Risky Dave" wrote in message
...
Hi,

I am not a programmer, so apologies if I don't use the correct terms here -
hope it makes sense!

I have a piece of code that uses a string (Dim Storage As String)to store
text concatenated from a series of cells.

What I now want to do is display the concatenated text in a single cell.

I have tried to use:

Range("A1").Value = Storage

But this doesn't actually display the text held in Storage in cell A1. When
I select the cell, it remains blank, but the Formula bar shows that correct
value is associated with the cell.

Any suggestions on how I move the text value of Storage into A1?

This is in Office 2007 under Vista, if that's of any importance.

TIA

Dave




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
Grabbing string values from the end of a string of an unknown length Mark Stephens Excel Programming 24 July 8th 08 06:57 AM
Replace Hyperlink Addresses Help 'Dim OldStr As String, NewStr As String Ron[_14_] Excel Programming 6 January 23rd 07 07:38 PM
Importing Long String - String Manipulation (INVRPT) (EDI EANCOM 96a) Brian Excel Programming 3 February 9th 06 03:38 PM
Importing Long String - String Manipulation (EDI EANCOM 96a) Brian Excel Programming 6 February 9th 06 12:27 PM
to search for a string and affect data if it finds the string? Shwaman Excel Worksheet Functions 1 January 11th 06 12:56 AM


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