Visual Basic For EXCEL question
#1
Scooby Regular
Thread Starter
Join Date: Oct 2002
Location: ex UK [SE], now Sunshine State [QLD,AUS]
Posts: 565
Likes: 0
Received 1 Like
on
1 Post
dont suppose you know the answer to this one as well ??
different vb question
[Edited by velohead66 - 11/5/2002 8:12:13 AM]
different vb question
[Edited by velohead66 - 11/5/2002 8:12:13 AM]
#2
Scooby Regular
Thread Starter
Join Date: Oct 2002
Location: ex UK [SE], now Sunshine State [QLD,AUS]
Posts: 565
Likes: 0
Received 1 Like
on
1 Post
Say you have a variable called x that is different length of characters each time a next loop is run.
In VB how do you delete the last character.
eg change "20.00-" to "20.00"
and then change "20000.00z" to "20000.00"
on the next loop ????
NB1 Loop might run up to 1,000 times, as it passes down a column of figures
NB2 Character to be deleted will be a different character each time, but always in the same place.
PS-I could use excel functions mid.right,left etc, but I want the VB script please.
Ta
In VB how do you delete the last character.
eg change "20.00-" to "20.00"
and then change "20000.00z" to "20000.00"
on the next loop ????
NB1 Loop might run up to 1,000 times, as it passes down a column of figures
NB2 Character to be deleted will be a different character each time, but always in the same place.
PS-I could use excel functions mid.right,left etc, but I want the VB script please.
Ta
#3
If you assign the result to a variable Y then:
y=left(x,len(x)-1))
Here, you are taking the length of the string minus one, and using this to return the left part of your string.
Hope that helps,
Martin.
y=left(x,len(x)-1))
Here, you are taking the length of the string minus one, and using this to return the left part of your string.
Hope that helps,
Martin.
Thread
Thread Starter
Forum
Replies
Last Post
Mattybr5@MB Developments
Full Cars Breaking For Spares
28
28 December 2015 11:07 PM
bluebullet29
General Technical
9
05 October 2015 02:17 PM
Pro-Line Motorsport
Car Parts For Sale
2
29 September 2015 07:36 PM