Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi
how should I define the data type of a variable which has format general in excel sheet? The problem is I want to put a value to a few empty columns of a column "PL". The occupied cells has a format GENERAL in excel but they are all numbers. Also, in the excel sheet, all the occupied cells show an exclamation mark (!) error (showing number stored in text). I defined the value to be put in empty cells as STRING .... but still when I see the final output the numbers are all right aligned...but with GENERAL format. THE values to be filled in these empty cells are being taken from the filled cells of same column. I think to make all the cells look identical I need to copy paste rather than putting the value??? here is that part of code where I put the value from the specified cell... Sub finalVal() Dim v1 As String If flagrow3 = True Then With Worksheets(rawDataWorksheetName).Cells(row3, col1) v1 = .Value finalValue = v1 End With End If If flagrow2 = True Then With Worksheets(rawDataWorksheetName).Cells(row2, col1) v1 = .Value finalValue = v1 End With End If End Sub thanks in advance monikA |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You need to format the cells in the sheet as Text before putting th
value -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Importing data. Problem with datatype in column | Excel Discussion (Misc queries) | |||
Save as a dbf file changes datatype | Excel Discussion (Misc queries) | |||
Vlookup datatype(?) issue | Excel Worksheet Functions | |||
DataType Conversion | Excel Programming | |||
How do I change the datatype of a cell? | Excel Programming |