Output result of formula on different cell without VBA - excel

Is it possible to output the result of a formula on a different cell without the use of VBA and without directly reffering to the cell containing the formula (e.g. writting =C1 into the output cell)?
I know that this can be easily done with the help of VBA, but I was wondering if there really is no simpler way to achieve this.

I don't think so, if you dont want VBA then all I can think of is to lock the cells so they can't be updated.
How to lock just a range of cells

As far as I know all formulas display their results within the cell they occupy.
if you want to pull a value from a cell without directly referencing the cell address, you could indirectly by using the offset function. However even the offset function needs to reference at least one cell on the worksheet.

Related

Transforming SUMIFS to individual cell references

I am new here, so apologies if this has been answered before.
I am trying to create a VBA script to transform cells using SUMIFS to pull data to individual cell references.
Ie. if I pull a value from another tab using a SUMIFS function, I want the output to be exactly the cell it is referenced (=cell).
Specifically, I am thinking of:
Read all cells in a sheet,
Identify which cells pull value with a SUMIFS function
Get the cell reference from which the data matching the SUMIFS is sourced
Convert the SUMIFS formula to the matching cell reference (ie. =A35)
I am trying to see individual codes for this, but not sure where to begin with, or if this has been previously solved.
Any thoughts will be highly appreciated!
Thank you!
Tried the above steps

Finding a range and then implementing it in another formula

I am trying to use a variable range based on a pre-defined criteria. In my case I would like to find the range of the “AUD” cells in the table. I managed to get the beginning of the range thanks to:
=ADDRESS(1;MATCH("AUD";1:1;0))
And then I found the end of the range using a slightly modified above formula:
=ADDRESS(1;(MATCH("AUD";1:1;0)+(COUNTIF(1:1;"AUD"))-1))
Then I simply combined the results with the following formula:
=(B4&":"&C4)
And the achieved result was:
$B$1:$D$1
However, I am having difficulties implementing this result inside formulas in which range must be defined, which brings me to my following questions:
Is such kind of implementation possible in EXCEL, I suspect that the result is considered as a simple text and not actually a cell reference? Is there a way I can change that?
One step further, if we trim (for example from $B$1 to just $B) can we still make the formula working?
Due to the fact that to save space I will probably write all the above formulas inside one formula and I expect this formula to become huge, would it be possible to create a VBA public function which can store the range in a variable and then just refer this variable to the formula - for example, SUMIF("=audRefCell()";"AUD";2:2).
I would like to thank you in advance for the help!

EXCEL Changing One Specific Thing in a Formula

I have a spreadsheet full of references, pretty much every permutation you can imagine.
EX:
='January Scorecard'!F7
='February Scorecard'!F7
='March Scorecard'!H7
='April Scorecard'!H7
I want to be able to change specific things of the formula across an entire row or column. So if I need to change a row where all of the references currently point to 'H7', I want to be able to quickly change all of them to 'F31' or another arbitrary cell value.
What are quick ways to change cells specifically while keeping the reference sheets the same?
You need to use the INDIRECT function. This takes a cell reference which contains text representing a cell address, and converts it into that cell address. So if cell A1 had the text "H7", then your example cells would now have
=INDIRECT("'March Scorecard'!" & A1)
whcih would firstly convert to "'March Scorecard'!H7 " and then the indirect would convert it to ='March Scorecard'!H7

referencing an array that's stored in a cell within a formula

=INDEX($AT$1:$AY$66,MATCH("REGULAR PAY *",$AT$1:$AT$66,0),3)
Because I use this same array value ($AT$1:$AY$66) in multiple formulas across the sheet (and it could change at some point) it would be nice if I could put $AT$1:$AY$66 into a cell and reference it within this formula. So far I haven't had any luck being able to do that.
I've managed to get past this now by using INDIRECT(BF7) in place of my AT1:AY66 where BF7 is where I have AT1:AY66. Now if it happens that I need to change that array to AT1:AY70 for example I can just change it in BF7 and it will alter all my formulas accordingly.

vba excel formula in locked cell changes to numeric value

I have a simple formula (an AutoSum) in a protected sheet and locked cell. My VBA code does not access this cell directly. Despite this, the formula sometimes changes to the numeric result when the sum changes. Any ideas how I can prevent this from happening?
It sounds like the Cell value is being set implicitly which over writes the formula. You may have a cell reference that you are missing. If your code does not set anything in that cell, then there is something in your workbook doing it. Try going to the Formulas tab and selecting Trace Dependents. See if an arrow points to something you were not aware of. Some of my sheets get so huge that I can loose track of things. Especially if I do any cutting and pasting.

Resources