Excel - Replace cell link in formula with value in cell

keynesiancross

I'm trying to figure clean up a spreadsheet - but I'm trying to avoid typing out a lot of hardcoded values that are referenced in formulas.

So right now, I have a function that takes a string

=FunctionThatWantsAString(A1,SomeOtherInputs)

In Cell A1 I have "SomeString"

Is there a way to easily replace the cell link "A1" in the formula with the string "SomeString"?

Thanks

Grade 'Eh' Bacon

The simple solution is to go to the Formulas ribbon > Defined Names > Name Manager > New [or simply select A1, and then click on the NameBox which says "A1" and type in "SomeString"]

This allows you to name a specified range. You can then refer to that name either within an excel worksheet or within VBA.

Edit for additional request If you don't want A1 to have to hold the text "SomeString", you can actually use the name manager to create a name which refers to a string. ie: you can have the Name SomeString be equal to "asdf". Then, use ctrl+f to find and replace all instances of "A1," in your worksheet with "SomeString".

Alternatively , just use ctrl+f to find and replace "A1" with ""asdf"", and have your results hardcoded directly in all cells. Probably not recommended to do that though, for maintenance purposes.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Excel Formula Not Updating Cell

From Dev

Excel - replace a formula cell with its result automatically

From Dev

How to change a formula according to cell value in excel?

From Dev

Determining if Excel cell contains array formula or text value

From Dev

Excel - Replace offset formula with actual cell reference

From Dev

Convert the cell to the formula with replace

From Dev

Force excel formula to update when non related cell value changes

From Dev

how to apply formula in excel cell without the value being shown

From Dev

Excel changes cell formula

From Dev

Determining if Excel cell contains array formula or text value

From Dev

Can I use an excel formula to extract the link location of a hyperlink in a cell?

From Dev

Use a cell value (text) as a part of a formula in Excel VBA

From Dev

Excel formula - If value was found in row return value from next cell

From Dev

Excel Precedents.Count returning incorrect value within cell formula

From Dev

Excel cell value and formula bar display different data

From Dev

Excel if blank cell use different cell in formula

From Dev

Excel Formula Assign Value based on Color of Cell

From Dev

Excel formula SUMIFS use cell value in array range

From Dev

Excel: Keep *first* calculated value in cell and ignore/delete formula afterwards?

From Dev

Excel - Inserting cell value in formula column name

From Dev

Execute the formula Only if we feed in to the cell - No "0" value - Excel 2010

From Dev

Excel formula- If value is greater than.. move to next cell

From Dev

Excel formula to lookup the last value in a column and return the value of the adjacent cell

From Dev

Excel - How to read cell value exactly as they show up on the spreadsheet, not by formula

From Dev

How to pass int value from cell in to excel formula

From Dev

Excel VBA Replace cell with answer from formula

From Dev

Formula if cell = value to carry out formula else...Excel VBA

From Dev

Replace value in cell as cell reference

From Dev

Excel Formula: Reference a cells value whilst maintaining original cell reference

Related Related

  1. 1

    Excel Formula Not Updating Cell

  2. 2

    Excel - replace a formula cell with its result automatically

  3. 3

    How to change a formula according to cell value in excel?

  4. 4

    Determining if Excel cell contains array formula or text value

  5. 5

    Excel - Replace offset formula with actual cell reference

  6. 6

    Convert the cell to the formula with replace

  7. 7

    Force excel formula to update when non related cell value changes

  8. 8

    how to apply formula in excel cell without the value being shown

  9. 9

    Excel changes cell formula

  10. 10

    Determining if Excel cell contains array formula or text value

  11. 11

    Can I use an excel formula to extract the link location of a hyperlink in a cell?

  12. 12

    Use a cell value (text) as a part of a formula in Excel VBA

  13. 13

    Excel formula - If value was found in row return value from next cell

  14. 14

    Excel Precedents.Count returning incorrect value within cell formula

  15. 15

    Excel cell value and formula bar display different data

  16. 16

    Excel if blank cell use different cell in formula

  17. 17

    Excel Formula Assign Value based on Color of Cell

  18. 18

    Excel formula SUMIFS use cell value in array range

  19. 19

    Excel: Keep *first* calculated value in cell and ignore/delete formula afterwards?

  20. 20

    Excel - Inserting cell value in formula column name

  21. 21

    Execute the formula Only if we feed in to the cell - No "0" value - Excel 2010

  22. 22

    Excel formula- If value is greater than.. move to next cell

  23. 23

    Excel formula to lookup the last value in a column and return the value of the adjacent cell

  24. 24

    Excel - How to read cell value exactly as they show up on the spreadsheet, not by formula

  25. 25

    How to pass int value from cell in to excel formula

  26. 26

    Excel VBA Replace cell with answer from formula

  27. 27

    Formula if cell = value to carry out formula else...Excel VBA

  28. 28

    Replace value in cell as cell reference

  29. 29

    Excel Formula: Reference a cells value whilst maintaining original cell reference

HotTag

Archive