Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,670
Default Help on coding please

Under Temp worksheet, there is 0.03 (2.6%) in cell A1.
I would like to copy anything inside the blanket (), in this case, I would
like to copy 2.6% into cell B1 under Summary worksheet.
Does anyone have any suggestions on how to do it in macro coding?
Thanks in advance for any suggestions
Eric

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Help on coding please

Don't really understand what you want but this will copy the cell

sheets("temp").range("a1").copy sheets("summary").range("b1")

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Eric" wrote in message
...
Under Temp worksheet, there is 0.03 (2.6%) in cell A1.
I would like to copy anything inside the blanket (), in this case, I would
like to copy 2.6% into cell B1 under Summary worksheet.
Does anyone have any suggestions on how to do it in macro coding?
Thanks in advance for any suggestions
Eric


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help on coding please

Like Don, I am unsure what you actually want. I think you are saying you
have the text "0.03 (2.6%)" in Temp!A1 and you want to put the "2.6%" part
into Summary!B1. If so, you don't need to use a macro to do that; you can
use this formula in Summary!B1 instead...

=MID(Temp!A1,FIND("(",Temp!A1)+1,LEN(Temp!A1)-FIND("(",Temp!A1)-1)

If the contents of Temp!A1 do not have both an opening and closing
parenthesis, you will get a #VALUE! in Summary!B1.

Rick


"Eric" wrote in message
...
Under Temp worksheet, there is 0.03 (2.6%) in cell A1.
I would like to copy anything inside the blanket (), in this case, I would
like to copy 2.6% into cell B1 under Summary worksheet.
Does anyone have any suggestions on how to do it in macro coding?
Thanks in advance for any suggestions
Eric


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,670
Default Help on coding please

I would like to trim the string,
for example
The string is 0.03 (2.6%), in order to retrieve value within blanket
then trim this string and get the value 2.6%, that is what I want.

Get 2.6% from 0.03 (2.6%)

Do you have any suggestions?
Thank you very much for any suggestions
Eric


"Don Guillett" wrote:

Don't really understand what you want but this will copy the cell

sheets("temp").range("a1").copy sheets("summary").range("b1")

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Eric" wrote in message
...
Under Temp worksheet, there is 0.03 (2.6%) in cell A1.
I would like to copy anything inside the blanket (), in this case, I would
like to copy 2.6% into cell B1 under Summary worksheet.
Does anyone have any suggestions on how to do it in macro coding?
Thanks in advance for any suggestions
Eric



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help on coding please

If you can't use the direct formula I posted in my other response, you can
use this macro code to do what you asked...

Sub GetPercentage()
Dim CellText As String
CellText = Worksheets("Temp").Range("A1").Value
Worksheets("Summary").Range("B1").Value = Mid(CellText, InStr(CellText, _
"(") + 1, Len(CellText) - InStr(CellText, "(") - 1)
End Sub

Rick


"Eric" wrote in message
...
I would like to trim the string,
for example
The string is 0.03 (2.6%), in order to retrieve value within blanket
then trim this string and get the value 2.6%, that is what I want.

Get 2.6% from 0.03 (2.6%)

Do you have any suggestions?
Thank you very much for any suggestions
Eric


"Don Guillett" wrote:

Don't really understand what you want but this will copy the cell

sheets("temp").range("a1").copy sheets("summary").range("b1")

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Eric" wrote in message
...
Under Temp worksheet, there is 0.03 (2.6%) in cell A1.
I would like to copy anything inside the blanket (), in this case, I
would
like to copy 2.6% into cell B1 under Summary worksheet.
Does anyone have any suggestions on how to do it in macro coding?
Thanks in advance for any suggestions
Eric




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to fix the coding? Eric Excel Worksheet Functions 4 June 20th 07 02:42 PM
"=ROW()-1" type of coding doesn't appear in a filter / is there coding that does? StargateFan[_3_] Excel Programming 10 October 6th 05 01:18 PM
Implant macro coding into ASP coding Sam yong Excel Programming 5 September 15th 05 10:37 AM
VBA coding Eléna Excel Programming 3 September 22nd 04 03:45 PM
Coding Tom Ogilvy Excel Programming 0 September 9th 04 01:44 PM


All times are GMT +1. The time now is 04:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"