Friday, January 13, 2012

bc (unix)

Precision 에 제한받지 않고 계산할 수 있는 계산기
terminal 에서 bc 로 실행
http://en.wikipedia.org/wiki/Bc_programming_language

소숫점 아래 표시법 (-l 옵션)
그냥 실행하면 소수점 아래 숫자가 0개로 되는데 (2/3 하면 0이 나옴) 이렇게 안되게 하려면
bc -l 로 실행하면 됨 (디폴트로 소숫점 아래 20개 표시)

이때 주의점 :
The -l option changes the scale to 20 (source), so things such as modulo may work unexpectedly. For example, write "bc -l" and then the command "print 3%2" outputs 0, instead of 1. But if you do it like "bc -l", "scale=0" and then the command "print 3%2" has 1 as output.

키워드 : calculation

Wednesday, January 4, 2012

Excel에서 다른 Sheet의 수를 reference하는 법

질문 : Excel에서 다른 Sheet의 Cell을 참조하는 법
답 : =Sheet1!A1 + A2
와 같이 쓰면 된다.
레퍼런스 : Linking to other Excel Worksheets

Tuesday, January 3, 2012

Excel에서 Multiplication Table 만드는 법?

질문 : Excel에서 Multiplication Table 만드는 법?
답 : Absolute Reference 를 사용한다.
"=A2*B1" 를 넣어야 할 부분에 "=$A2*B$1" 를 넣고, 그걸 다른 셀에 다 복사해 넣으면 됨.



레퍼런스 : Create a Multiplication Table

Excel의 Absolute Reference

질문 : Cell의 formula를 Copy & Paste 할 때 특정 cell에 대한 reference가 변하지 않도록 하는 법?

답 : 예를 들어 A1을 Absolute reference로 쓰려면 $A$1이라고 쓰면 된다.
Row만 Absolute reference로 하려면 A$1로,
Column만 Absolute reference로 하려면 $A1로 하면 됨.

Shortcut : 간편히 핫키로 하려면 edit mode 에서 Command + T 를 치면 됨.
Command + T (edit mode) : Toggle Anchoring ($ in cell ref)

응용 예 :
Excel에서 Multiplication Table 만드는 법?

인용 : If part of an Excel formula references one fixed cell, you'll need to make some adjustments to that formula before copying and pasting it to other cells.

You need to indicate to Excel that the reference to C1 in the formula is Absolute. Do this by inserting a dollar sign before the C and before the 1 in the formula. The formula in F4 would change to =ROUND((D4*E4)*$C$1,2). As you copy this formula down to other rows in your dataset, the portion that refers to $C$1 will continue to point at $C$1

레퍼런스 : Microsoft Excel: Copy a Formula While Keeping One Reference Fixed

Mac OS X의 Excel에서 페이지로 나뉘어 보이는 것 없애는 법?

질문 : Mac OS X의 Excel에서 page 단위로 나뉘어 보이는데 하나로 보이게 하는 법?
답 : 메뉴 > View > Page Layout 으로 되어 있을 것인데
메뉴 > View > Normal 로 바꾸면 된다.
Preferences 에서 Show Page Breaks 도 체크를 꺼준다.
인용 :
You are seeing Page Layout view.
You can also use View>Normal if you don't want to see where printed pages will break.
레퍼런스 : Excel 08 default view is 2 pages?