473,406 Members | 2,619 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Append 0 character in cell value along with cell values in Excel

I want to append "0" along with cell value if there is no "0" in beaning of cell value.

Range of cells are S3:S100

I tried the following logic but it does not work.
Expand|Select|Wrap|Line Numbers
  1. For Each cell In [S3:S100]
  2. If cell.value is not null then
  3. if left((cell.Value), 1) <> 0 Then
  4. cell.Value = "0" & cell.value
  5. End If
  6. Next cell
Can anyone please help me
Thanks
Aug 14 '15 #1
1 2854
Luuk
1,047 Expert 1GB
Easier would be to change the Format under Cell Properties to enough zero's.

The value (i.e.) '42', with a format of '000' is displayed as '042'

see: https://support.microsoft.com/en-us/kb/81518
Sep 12 '15 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: AMeador | last post by:
I need to have my c# application actually create a new Excel file from an Excel template file, and then update a bunch of fields in the new file. Can this be done? I am using VS.NET 2003 EA Edition...
1
by: PCK | last post by:
I am trying to select a single cell from an Excel workbook. I am using the following code. strCN = GetExcelConnection("C:\Test\Excel.xls") strCMD = "select * from " oleDbCN = New...
1
by: Paul | last post by:
Hello I have an automated excel 2002 spreadsheet. I would like to draw some of the cell values out of excel into some text boxes. I'm real new at VB.net. I would appreciate any assistance that...
3
by: nagen | last post by:
I have an existing excel file & i would like to enter a specific value at cell A1 in Excel2003 using asp.net 2.0 how can i do this?
1
by: ssknov | last post by:
i need to populate my textbox with the datagridivews cell values which is selected how to do this? ssk
0
by: suresh_punniyakkodi | last post by:
Hellow Friends, I have one doubt, please help me... In Excel, i have lot of rows and coloumns, i need to read all cell values with in rows and coloumn limit... At the time...
1
by: Tony Bansten | last post by:
As fas as I heard I can write to Excel cell e.g. E53 from outside with VBS. How could such a code look like? Assume I have an Excel file aaa.xls and a worksheet "ws777" inside: How can I wread...
5
by: dave816 | last post by:
Sorry for the Excel question in an Access forum...................I don't see an Excel forum and there's probably a reason for that but figured I'd give this a shot anyway. Again sorry, delete if...
3
by: uxcrh | last post by:
Hello All, I have a simple data-table being sourced from an Oracle DB. There is a column whereas each cell contains only one character - "R","Y", or "N". The logic is focused on the correct...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.