How to get formula relative specify cell?

Khanh

New Member
Joined
Apr 21, 2020
Messages
7
Office Version
  1. 365
Platform
  1. Windows
From this photo,

bug1.png

I want to find the corresponding formula at E4.
The usual implementation that I know of is Copy B4 then paste E4.
The desired result is =SUM(E2:E3)

My question is: Based on the formula in B4, and the rows and columns spacing parameters (here between E4 and B4: rows=0 and columns=3).
Can I define the formula at E4?

Thanks you!
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
I don't really follow, but perhaps you mean
Excel Formula:
=SUM(OFFSET(B2:B3,0,3))
?
 
Upvote 0
I don't really follow, but perhaps you mean
Excel Formula:
=SUM(OFFSET(B2:B3,0,3))
?
Hi, Thanks for the reply and formula.
Can I achieve this formula by code? such as:
VBA Code:
Dim a string 
a= Range("B4").formula 
Dim rowsas integer :rows=0
Dim columns as integer:columns=3
Dim result as string 
...
to get result formula at E4 is "=Sum(E2:E3)"
(I need to calculate it without affecting the spreadsheet. )
 
Upvote 0
What exactly does that mean?
Hi, I mean not put any values on the spreadsheet. such as
Range("B4").copy.
Range("E4").pastevalue (this put temporary value to cell)
I have another example:
At `B4 "=B2+B3" `
The desired formula at `E4 "=E2+E3"`
 
Upvote 0
If you want the same formula in E4 as B4, why can't you just copy it? Or simply use something like Range("E4").FormulaR1C1 = Range("B4").formular1c1?
 
Upvote 0
If you want the same formula in E4 as B4, why can't you just copy it? Or simply use something like Range("E4").FormulaR1C1 = Range("B4").formular1c1?
Hi,
I hadn't thought of this formula.
Exactly what i need. Thanks very much!
 
Upvote 0

Forum statistics

Threads
1,214,614
Messages
6,120,517
Members
448,968
Latest member
Ajax40

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top