Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using the following array to obtain data from a worksheet:
zs_subldeger = (Range(Cells(row_set, 1), Cells(lastrow, 1))) The value of the cell is 0001 however the data is read as a numeric value of 1? How do I retain the text value 001? When I Dim zs_subldeger as string I get a type mismatch error . Thanks -- Ray |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ray wrote:
I am using the following array to obtain data from a worksheet: zs_subldeger = (Range(Cells(row_set, 1), Cells(lastrow, 1))) The value of the cell is 0001 however the data is read as a numeric value of 1? How do I retain the text value 001? When I Dim zs_subldeger as string I get a type mismatch error . Thanks dim zs_subldeger as string zs_subldeger = Format$((Range(Cells(row_set, 1), Cells(lastrow, 1))),"000") Is it what you need? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
witek wrote:
Ray wrote: I am using the following array to obtain data from a worksheet: zs_subldeger = (Range(Cells(row_set, 1), Cells(lastrow, 1))) The value of the cell is 0001 however the data is read as a numeric value of 1? How do I retain the text value 001? When I Dim zs_subldeger as string I get a type mismatch error . Thanks dim zs_subldeger as string zs_subldeger = Format$((Range(Cells(row_set, 1), Cells(lastrow, 1))),"000") Is it what you need? or even better zs_subldeger = Format$((Range(Cells(row_set, 1), Cells(lastrow, 1))),Range(Cells(row_set, 1), Cells(lastrow, 1)).NumberFormat) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Lock Cell Format - Allow copy and paste of data without format change | Excel Worksheet Functions | |||
Increase Your Business By Data Conversion, Data Format and Data EntryServices in India | Excel Worksheet Functions | |||
Data Entry Online, Data Format, Data Conversion and Data EntryServices through Data Entry Outsourcing | Excel Discussion (Misc queries) | |||
Data in Cross-Tab format: needs to be written in Table Format | Excel Programming | |||
code for converting data format in another format | Excel Programming |