Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default need help- SUB: DATATYPE FOR A CELL..

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default need help- SUB: DATATYPE FOR A CELL..

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
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
Importing data. Problem with datatype in column Rolf Barbakken[_2_] Excel Discussion (Misc queries) 4 February 27th 09 06:46 AM
Save as a dbf file changes datatype araki Excel Discussion (Misc queries) 0 November 18th 05 10:42 PM
Vlookup datatype(?) issue ars Excel Worksheet Functions 1 January 25th 05 09:11 AM
DataType Conversion AsimKhaliq Excel Programming 0 January 21st 04 12:40 AM
How do I change the datatype of a cell? Casper Hornstrup Excel Programming 5 December 10th 03 01:46 PM


All times are GMT +1. The time now is 09:18 AM.

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

About Us

"It's about Microsoft Excel"