Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 06-27-2019, 06:03 PM
p45cal's Avatar
p45cal p45cal is offline Subtract from X formula? Windows 10 Subtract from X formula? Office 2016
Expert
 
Join Date: Apr 2014
Posts: 956
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

Another way: Create a new sheet and call it bleugh. In its cell A1 enter 6, and in cell B1 enter -1

Then go to your sheet with the cells that want changing, select the cells and run:
Code:
Sub blah()
    Selection.SpecialCells(xlCellTypeConstants, 1).Select' selects only plain numbers within your selection.
    Sheets("bleugh").Range("A1").Copy '6
    Selection.PasteSpecial Operation:=xlSubtract
    Sheets("bleugh").Range("B1").Copy '-1
    Selection.PasteSpecial Operation:=xlMultiply
End Sub
Reply With Quote
 

Tags
ecxel formula, subtract from



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 07:23 AM.


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