[Solved] Converting a string into a cell number

Discuss the spreadsheet application
Post Reply
clfaye
Posts: 2
Joined: Thu Oct 08, 2020 9:08 pm

[Solved] Converting a string into a cell number

Post by clfaye »

I have a cell (example B405) that contains the name of another cell (example C32) as a string. C32 has a number in it. I would like to have a function to bring in the number from C32 using the string from B405. I have a function - but it doesn't work:

{
Function Cell_Equals(Text_From_Cell as string)

Cell_Equals = "=" + Text_From_Cell

end function
}

but all this does is plop =C32 into the new cell as a string. This is what you would type into the cell to get the value from C32, but I don't know how to stop having Calc treat it as a string.
Thanks!
Chris
Last edited by robleyd on Thu Oct 08, 2020 11:58 pm, edited 1 time in total.
Reason: Tagged [Solved]
OpenOffice 4.1.5, Windows 10
User avatar
RusselB
Moderator
Posts: 6646
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: Converting a string into a cell number

Post by RusselB »

Welcome to the Forums.

Rather than creating your own function, this sounds like what the INDIRECT function does.
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
clfaye
Posts: 2
Joined: Thu Oct 08, 2020 9:08 pm

Re: Converting a string into a cell number

Post by clfaye »

Yes - that is perfect! Thanks!
OpenOffice 4.1.5, Windows 10
Post Reply