[Solved] Making 1 number = another

Discuss the formula editor
Post Reply
Unknown Mr
Posts: 67
Joined: Sun Feb 01, 2009 7:45 pm
Location: Michigan, USA

[Solved] Making 1 number = another

Post by Unknown Mr »

I am trying to make it so when I type in a number, a differnt number will come up. Example:

1 = 1
2 = 100
3 = 200
4 = 400
5 = 800
6 = 1,600

I want to make it so if I type 6 in a cell, then hit enter, the number 1,600 will come up instead.
Is there any way to do that?
Last edited by Unknown Mr on Sat Feb 21, 2009 12:25 am, edited 2 times in total.
Calc's Spreadsheet

Unknown Mr
OOo 3.0.X on MS Windows Vista
User avatar
TheGurkha
Volunteer
Posts: 6482
Joined: Thu Mar 13, 2008 12:13 pm
Location: North Wales, UK.

Re: Making 1 number = another.

Post by TheGurkha »

I think you should have posted this in the Calc forum. The Math forum is for questions regarding the Math application which is OOo's equation editor. Someone willcome along and probably move your thread.

Meanwhile, what exactly are you trying to achieve through this 'enter one number and get another number' scheme?
Ubuntu 14.10 Utopic Unicorn, LibreOffice Version: 4.3.3.2
Gurkha Welfare Trust
Unknown Mr
Posts: 67
Joined: Sun Feb 01, 2009 7:45 pm
Location: Michigan, USA

Re: Making 1 number = another.

Post by Unknown Mr »

Sorry :(

But here is an example of what I want to do.
Calc's Spreadsheet

Unknown Mr
OOo 3.0.X on MS Windows Vista
User avatar
TheGurkha
Volunteer
Posts: 6482
Joined: Thu Mar 13, 2008 12:13 pm
Location: North Wales, UK.

Re: Making 1 number = another.

Post by TheGurkha »

You could use this formula in B2: =IF(B1=E2;F2;IF(B1=E3;F3;IF(B1=E4;F4;IF(B1=E5;F5;IF(B1=E6;F6;IF(B1=E7;F7;1600))))))

See the example sheet.
Example.ods
Modified example sheet
(10.33 KiB) Downloaded 316 times
If this has answered your question please go to your first post and use the Edit button, and add [Solved] to the start of the title. You can use the green tick icon at the same time if you like.
Ubuntu 14.10 Utopic Unicorn, LibreOffice Version: 4.3.3.2
Gurkha Welfare Trust
Unknown Mr
Posts: 67
Joined: Sun Feb 01, 2009 7:45 pm
Location: Michigan, USA

Re: Making 1 number = another.

Post by Unknown Mr »

Thats a huge formula! I have... 299 of those things to do (the 6 = 1,600 things), does the function thing have a limit of how big your formula can be? Because if so, I'm going to need another way :(

But thank you :D I can use that for now.
Calc's Spreadsheet

Unknown Mr
OOo 3.0.X on MS Windows Vista
User avatar
TheGurkha
Volunteer
Posts: 6482
Joined: Thu Mar 13, 2008 12:13 pm
Location: North Wales, UK.

Re: Making 1 number = another.

Post by TheGurkha »

OK, use this in B2: =VLOOKUP(B1;E2:F7;2)

The E2:F7 indicates the start of column '1' the lookup column (E2) and the bottom of column '2' for the returned values (F7). With big ranges this is a neater way to do it. Check out the on-line help for vlookup().

If this has answered your question please go to your first post and use the Edit button, and add [Solved] to the start of the title. You can use the green tick icon at the same time if you like.
Ubuntu 14.10 Utopic Unicorn, LibreOffice Version: 4.3.3.2
Gurkha Welfare Trust
Unknown Mr
Posts: 67
Joined: Sun Feb 01, 2009 7:45 pm
Location: Michigan, USA

Re: Making 1 number = another.

Post by Unknown Mr »

Thank you so much! :D That worked!

I'll mark it "Solved" now.
Calc's Spreadsheet

Unknown Mr
OOo 3.0.X on MS Windows Vista
Post Reply