Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-29-2018, 08:25 PM
kevinbradley57 kevinbradley57 is offline Convert range format to number Windows 7 64bit Convert range format to number Office 2010 64bit
Advanced Beginner
Convert range format to number
 
Join Date: Jul 2017
Posts: 89
kevinbradley57 is on a distinguished road
Default


What is the proper syntax to convert a cell in which a number is stored as text and a negative number is displayed in parenthesis e.g. "(145.50)" to a format in which a negative number is displayed with a negative sign prefix e.g. "-145.50"?

The code below gives me this Run-time error: Method 'Range' of object '_Global' failed.

Code:
With sht
    .Range("K2:N" & lastrow).NumberFormat = "General"
End With
Thank you.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert range format to number Format a range of cells Dave T Excel Programming 1 06-01-2016 08:58 PM
Convert range format to number How to format a TOC (level 1) using a number, but have the number hidden in the text porpoiseoil Word 1 09-13-2014 12:53 PM
IF statement - number range irhut Mail Merge 1 02-11-2014 11:20 PM
Change from General Format to number format gbaker Excel 3 08-16-2013 01:04 PM
Convert range format to number Cannot Convert Text Cell to number format to be able to sort the data jyfuller Excel 10 06-19-2013 05:31 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:49 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft