Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-24-2023, 04:03 AM
p45cal's Avatar
p45cal p45cal is offline Using VBA to return values from several cells as a formula. Windows 10 Using VBA to return values from several cells as a formula. Office 2019
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


I don't know what your sheets' names are so you'll need to adjust this:
Code:
With Sheets("Sheet1")
  Sheets("Sheet2").Range("Q165").Value = .Range("A23").Value + .Range("A24").Value - .Range("A25").Value
End With
…and there are many other ways.
Reply With Quote
  #2  
Old 05-25-2023, 11:58 AM
BYahr BYahr is offline Using VBA to return values from several cells as a formula. Windows 11 Using VBA to return values from several cells as a formula. Office 2021
Novice
Using VBA to return values from several cells as a formula.
 
Join Date: Mar 2023
Posts: 16
BYahr is on a distinguished road
Default

Thank you, p45cal. This helps. The result is the correct value but I would prefer to get the individual values in a formula. EX =100+5-1 to display 104. This makes it easy to know where the values originated.

The sheets that I am working with are in two different workbooks.
Reply With Quote
Reply

Tags
combine data in cells, vba to display a formula.



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to match one list with another and return certain values from corresponding cells in excel Oluagbe1 Excel 10 02-11-2019 07:00 PM
Using VBA to return values from several cells as a formula. Loop through cells and return only unique values trevorc Excel Programming 4 10-11-2018 03:49 PM
Using VBA to return values from several cells as a formula. have a formula that combines two cells return a zero instead of a blank cell Kubi Excel 3 08-07-2017 11:52 PM
Formula/function to return column names for matching values GiJoe81 Excel 1 06-27-2015 12:13 AM
Using VBA to return values from several cells as a formula. Excel Formula: return a range of cells that match tinfanide Excel 4 08-30-2014 07:03 AM

Other Forums: Access Forums

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