Macros. Table. function to get the cell formula

Post Reply
OIZhivaeva
Posts: 3
Joined: Tue Jun 23, 2020 1:48 am

Macros. Table. function to get the cell formula

Post by OIZhivaeva » Tue Jun 23, 2020 1:59 am

Good day!
Please tell me a function that allows you to get the cell formula (macro, table)

Carl
Posts: 378
Joined: Thu Apr 12, 2018 10:00 am

Re: Macros. Table. function to get the cell formula

Post by Carl » Thu Jun 25, 2020 3:46 pm

Hello OIZhivaeva,

Could you please describe in more details the function you require? Please describe the usage scenario.

OIZhivaeva
Posts: 3
Joined: Tue Jun 23, 2020 1:48 am

Re: Macros. Table. function to get the cell formula

Post by OIZhivaeva » Fri Jun 26, 2020 7:43 am

Good day!
For example, on Sheet "Sheet1" to cell C2, there is the formula- eomonth (A2, 6) , I want to go through macros for all cells , if the formula contains eomonrh (..., 6), then replace it with eomonrh (..., 12 )
I know how to get the cell value (03/31/2019), but how do I get the formula for cell C2?
Let oworksheet=api.getsheet("Sheet1")
Let svaluecell= oworksheet.GetRange("C2").GetValue();
Let sformulacell=oworksheet.GetRange("C2").????????

OIZhivaeva
Posts: 3
Joined: Tue Jun 23, 2020 1:48 am

Re: Macros. Table. function to get the cell formula

Post by OIZhivaeva » Fri Jun 26, 2020 7:57 am

Good day!
For example, on Sheet "Sheet1" to cell C2, there is the eomonth (A2, 6) formula, I want to go through the macro in the cells I need, if the formula contains eomonrh (..., 6), then replace it with eomonrh (..., 12 )
I know how to get the cell value (03/31/2019), but how do I get the formula for this cell?(eomonth (A2, 6) )

Let oworksheet=api.getsheet("Sheet1");
Let scellvalue=oworksheet.Getrange("C2").GetValue();
Let scellformula=oworksheet.Getrange("C2").?????
What function i must use , so that scellformula='(eomonth (A2, 6)'
For example, in goolgledocs is function Getrange("C2".Getfotmula())

Post Reply