Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Grabbing string values from the end of a string of an unknown length | Excel Programming | |||
Replace Hyperlink Addresses Help 'Dim OldStr As String, NewStr As String | Excel Programming | |||
Importing Long String - String Manipulation (INVRPT) (EDI EANCOM 96a) | Excel Programming | |||
Importing Long String - String Manipulation (EDI EANCOM 96a) | Excel Programming | |||
to search for a string and affect data if it finds the string? | Excel Worksheet Functions |