Microsoft
Software
Hardware
Network
Question : Help with formula - from excel to VBA
Hi,
A Pertty simple one I think, how can I turn this excel formula into vba...
Excel:
=LEFT(K22,FIND("-",K22)-2)
VBA:
answer = LEFT(row.value,FIND("-",ro
w.value)-2
)
msgbox answer
vba doesn';t like the FIND but...
the value of row.value, for example is '123456 - testtestest' but the starting number could be any length so it could be '123 - testtesttest' and I just want to extract the starting number before the '-'...
Thanks
Answer : Help with formula - from excel to VBA
This is one way...
Dim hour As Integer = 11
Dim minute As Integer = 30
Dim ampm As String = "AM"
Dim time As DateTime = DateTime.Parse(hour & ":" & minute & " " & ampm)
Wayne
Random Solutions
SBS 2003 upgrade to 2008
CPU's and VMware free edition?
Excel - Automatically copy a worksheet template to a new worksheet
VLANS from 3COM to CISCO via Trunk Port
How do I reset the palette position in Mathematica?
adding new site and subnet to network
Site to Site VPN Using D-Link DI-804HV and Netgear Prosafe DGFV338 ADSL Routers
I"m getting an undefined index error message on this script.
How to create a folder in the file system in run-time
Email on completed Scheduled Task