Results 1 to 5 of 5

VBA to run on one sheet

Threaded View

  1. #1
    Registered User
    Join Date
    03-01-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    35

    VBA to run on one sheet

    I apologise for having to ask this but my VBA knowledge is non-existent. I have inherited a workbook which uses the below code to convert numbers from text to numbers in all sheets however the workbook is so large it is taking ages to run and it only actually needs to run on one sheet named Data. How can I edit it to only run on the one sheet?

    Many thanks

    Sub Numbers()
    For Each WS In Sheets
    On Error Resume Next
    For Each r In WS.UsedRange.SpecialCells(xlCellTypeConstants)
    If IsNumeric(r) Then r.Value = Val(r.Value)
    Next
    Next
    End Sub
    Last edited by Legs; 05-22-2016 at 03:15 AM. Reason: Code tag

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 12-15-2015, 05:04 PM
  2. Lookup Value from Sheet 4 in Sheet 2, if found copy Sheet 2 Active Row to Sheet 5
    By lgosso23 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-11-2013, 02:51 PM
  3. [SOLVED] Match Value in Sheet 1 with Sheet 2, copy entire row from sheet 1 to new sheet
    By lzyshaman in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-01-2013, 07:48 AM
  4. Replies: 3
    Last Post: 02-20-2013, 12:54 AM
  5. [SOLVED] find code# from sheet 1 on sheet 2, compare value on sheet 1 with value on sheet 2
    By BlakeLee in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-27-2013, 01:52 PM
  6. Replies: 11
    Last Post: 10-14-2012, 01:03 PM
  7. Replies: 9
    Last Post: 04-04-2011, 12:03 AM
  8. Replies: 2
    Last Post: 10-12-2010, 05:00 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1