Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-23-2011, 02:42 AM
macropod's Avatar
macropod macropod is offline Reducing numbers by one Windows 7 64bit Reducing numbers by one Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi colliedug,



Here's a macro to do the work. Simply select the column then run it.
Code:
Sub SubtractOne()
Application.ScreenUpdating = False
Dim i As Long, Rng As Range
With Selection
  If .Information(wdWithInTable) Then
    For i = 1 To .Rows.Count
      With .Columns(1).Cells(i)
        Set Rng = .Range
        With Rng
          .End = .End - 1
          If IsNumeric(.Text) Then .Text = .Text - 1
        End With
      End With
    Next
  End If
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #2  
Old 06-23-2011, 03:04 AM
colliedug colliedug is offline Reducing numbers by one Windows XP Reducing numbers by one Office 2007
Novice
Reducing numbers by one
 
Join Date: Jun 2011
Posts: 4
colliedug is on a distinguished road
Default

Thank you so much Paul. I'm a bit puzzled as to why such a simple operation is not catered for already without having to resort to a macro.

Anyway your macro did the trick - thanks again.

Saved me a LOT of retyping
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with reducing pptm file size vbapptnew123 PowerPoint 1 06-11-2011 06:24 PM
Numbers in Words janak Excel 2 12-19-2010 08:53 PM
Increment Numbers Help Jazz43 Word 2 07-30-2010 02:48 AM
page numbers and TOC windon Word 0 09-09-2009 07:53 AM
Equation Numbers BillG Word 0 08-04-2009 08:02 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:33 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