Apply function to column of integers?

Discuss the spreadsheet application

Apply function to column of integers?

Postby NetCalc » Fri Jan 25, 2008 5:19 am

Hi,
I have about 2000 integers pasted into column "A" of the Calc app. I'd like to convert them all to binary using one of Calcs functions: DEC2BIN, and have the result show up in column 'B'.
I hit the function f(x) button, double click 'DEC2BIN', and thats as far as I get. Any ideas?
NetCalc
 
Posts: 2
Joined: Fri Jan 25, 2008 5:04 am

Re: Apply function to column of integers?

Postby kingfisher » Fri Jan 25, 2008 6:00 am

I never use that button. Have you looked at Help under DEC2BIN function? Your number can be the cell address so all you have to decide is the number of places you require. There seems to be a very limited range of decimal numbers which can be converted. I think your functions can be like =DEC2BIN(A1;8) then just copy it down.
Apache OpenOffice 4.1.6 on PCLinuxOS
User avatar
kingfisher
Volunteer
 
Posts: 2120
Joined: Tue Nov 20, 2007 10:53 am

Re: Apply function to column of integers?

Postby huw » Fri Jan 25, 2008 12:10 pm

NetCalc wrote:I hit the function f(x) button, double click 'DEC2BIN', and thats as far as I get. Any ideas?
Next, make sure the cursor is in the Number box, and click in the cell you want to convert. That will enter the cell's reference in Number. Fill in Places if required, and press OK. This will give you something like
Code: Select all   Expand viewCollapse view
=DEC2BIN(A1;10)

I use the f(x) a lot - it's a great help when using a new function, and the Structure tab helps when things go wrong. And pressing F1 while you have the Function Wizard open takes you straight to the appropriate section of Help.
huw
Volunteer
 
Posts: 417
Joined: Wed Nov 21, 2007 1:57 pm

Re: Apply function to column of integers?

Postby NetCalc » Sat Jan 26, 2008 4:10 am

Thanks for the replys.

I click the f(x) button, double click DEC2BIN, make sure the cursor is in the 'Numbers' box, and click on cell A1, which shows up in the 'Number' box as A1. I leave the 'Places' box empty. The formula =DEC2BIN(A1) shows up. I click 'Ok'. Cell A1 shows 'Error:552', and theres no binary conversion in the 'B' column. I guess I'm not there yet.
NetCalc
 
Posts: 2
Joined: Fri Jan 25, 2008 5:04 am

Re: Apply function to column of integers?

Postby kingfisher » Sat Jan 26, 2008 4:44 am

You have to put that formula in a cell other than A1. It could conveniently go in B1.
Apache OpenOffice 4.1.6 on PCLinuxOS
User avatar
kingfisher
Volunteer
 
Posts: 2120
Joined: Tue Nov 20, 2007 10:53 am


Return to Calc

Who is online

Users browsing this forum: No registered users and 26 guests