Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have downloaded from the web the weather conditions. In cell ("a1"), it
gives humidity: 70%. I would like with VBA remove "humitity:", leaving just the number "70%" and enter it in cell ("b1"). -- Thanks! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Format the cell for percentage. then use this formula
=VALUE(MID(A1,FIND(":",A1)+1,LEN(A1))) "Daviv" wrote: I have downloaded from the web the weather conditions. In cell ("a1"), it gives humidity: 70%. I would like with VBA remove "humitity:", leaving just the number "70%" and enter it in cell ("b1"). -- Thanks! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Maybe something like this:
In VBA, you could use this: Range(ActiveCell.Address).Offset(0, 1).Value = Right(ActiveCell.Value, Len(ActiveCell) - 10) As a formula, you could use this: In B1, enter: =RIGHT(A1,LEN(A1)-10) HTH, Paul "Daviv" wrote in message ... I have downloaded from the web the weather conditions. In cell ("a1"), it gives humidity: 70%. I would like with VBA remove "humitity:", leaving just the number "70%" and enter it in cell ("b1"). -- Thanks! |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have downloaded from the web the weather conditions. In cell ("a1"), it
gives humidity: 70%. I would like with VBA remove "humitity:", leaving just the number "70%" and enter it in cell ("b1"). Something like this maybe... With Range("A1") If InStr(1, .Value, "humidity: ", vbTextCompare) 0 Then .Offset(0, 1).Value = Mid$(.Value, InStr(.Value, " ") + 1) End If End With Rick |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have downloaded from the web the weather conditions. In cell ("a1"),
it gives humidity: 70%. I would like with VBA remove "humitity:", leaving just the number "70%" and enter it in cell ("b1"). Something like this maybe... With Range("A1") If InStr(1, .Value, "humidity: ", vbTextCompare) 0 Then .Offset(0, 1).Value = Mid$(.Value, InStr(.Value, " ") + 1) End If End With By the way, worksheet formula would execute much faster than a macro. Here is my contribution to the worksheet formula solution... In B1: =--REPLACE(A1,1,10,"") Rick |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find and Replace - Replace with Blank Space | Excel Discussion (Misc queries) | |||
Find & Replace and Find & Insert macro help needed | Excel Programming | |||
find and replace - replace data in rows to separated by commas | Excel Worksheet Functions | |||
Using Find and Replace to replace " in a macro | Excel Programming | |||
Replace method - cannot find any data to replace | Excel Programming |