Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 06-24-2019, 03:15 PM
Alansidman's Avatar
Alansidman Alansidman is offline Subtract from X formula? Windows 10 Subtract from X formula? Office 2019
עַם יִשְׂרָאֵל חַי
 
Join Date: Apr 2019
Location: Steamboat Springs
Posts: 115
Alansidman has a spectacular aura aboutAlansidman has a spectacular aura aboutAlansidman has a spectacular aura about
Default

I would do this with VBA. The following code will work if you have all your data in Column A.

Code:
Option Explicit

Sub MinusSix()
    Dim i As Long, lr As Long
    lr = Range("A" & Rows.Count).End(xlUp).Row
    Application.ScreenUpdating = False
    For i = 1 To lr    'Assumes data starts in Row 1
        Range("A" & i) = 6 - Range("A" & i)
    Next i
    Application.ScreenUpdating = True

End Sub
Reply With Quote
 

Tags
ecxel formula, subtract from

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
vba add and subtract code phoenixmoto Word VBA 6 11-06-2018 02:06 PM
Subtract from X formula? Subtract value if cell contains X term Jue92 Excel 4 11-01-2016 01:45 AM
Subtract value from one cell into another otuatail Excel 3 02-01-2016 03:21 AM
Subtract from X formula? How to Subtract value in table, based on two different conditions nitemath2 Excel 1 06-19-2015 01:28 AM
Formula to subtract one month from due date field in reminder field ghumdinger Outlook 1 10-01-2011 12:09 AM

Other Forums: Access Forums

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