LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default efine the data type of a variable

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

 
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
"Type mismatch" when I try to fill an Array variable with "+" [email protected] Excel Discussion (Misc queries) 1 April 17th 07 01:28 PM
Reading data from another sheet where data is in variable cells JDB Excel Discussion (Misc queries) 4 January 2nd 07 11:04 AM
type variable as argument of a sub Koos Excel Programming 1 October 23rd 03 11:41 AM
Variable Type - help me to solve this choco140 Excel Programming 1 September 28th 03 10:39 AM
User Defined Type Structure - want it to be variable not numeric literal WyoCracker Excel Programming 1 July 21st 03 09:28 PM


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