Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Q to Automate Removal of Characters from Cells

I am looking for a piece of VBA that will remove all characters/spaces to the left of the minus sign. All values are in Column D. I could have data in any Row between 2 & 500, of any value

Example is
" EURO -491.15

So I just want it to appear in cells as
-491.15
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Q to Automate Removal of Characters from Cells

Getting a debug on this line

rngC = Mid(rngC, InStr(rngC, "-"))

"invalid procedure or call arguement"

Note that I have removed all " -EURO values already, if thats the issue, so would would to trap that error so it doesnt happen if format is OK

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Q to Automate Removal of Characters from Cells

On Saturday, July 25, 2015 at 10:28:03 AM UTC+1, Claus Busch wrote:
Hi,

Am Sat, 25 Jul 2015 02:12:29 -0700 (PDT) schrieb :

Note that I have removed all " -EURO values already, if thats the issue, so would would to trap that error so it doesnt happen if format is OK


please post some of your strings.


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional



-491.15

-742.00

Details above, not row 2 is blank



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default Q to Automate Removal of Characters from Cells

Hi,

Am Sat, 25 Jul 2015 02:57:12 -0700 (PDT) schrieb :

-491.15

-742.00


but that is your expected output. You don't need a macro.


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
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
View code for removal of unwanted text in cells Doug Excel Discussion (Misc queries) 4 August 24th 09 05:31 AM
Linking cells/duplicate removal Canuckcrazy Excel Discussion (Misc queries) 0 June 19th 09 12:16 AM
Removal of empty cells in an Excel table Captain Excel Programming 1 July 21st 05 06:58 AM
req :Mackro for removal for emplyspaces in cells ? -[::::Shamran::::]- Excel Programming 1 May 17th 05 09:55 AM
Removal of characters from a range of cells KopRed Excel Worksheet Functions 3 February 17th 05 02:23 AM


All times are GMT +1. The time now is 07:11 PM.

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

About Us

"It's about Microsoft Excel"