Posterous theme by Cory Watilo

Replacement for nested if functions in Excel and more

Click here to download:
nested.if.xlsx (10 KB)
(download)

---------- Forwarded message ----------

age<=5 -1
5<age<10 0
10=<age<20 1
20=<age<=25 2
26<age
3
If you have attempted this:IF(L3<=5,-1,IF(AND(,L3>5,L3<10),0,IF(AND(L3>=10,L3<20,1,IF(AND(L3>=20,L3=<25),2,3)))), it's kind of a painful way, and there are also limitation of 7 nested or so I heard.
Any alternatives???

First thing come to mind is some lookup method, see attached first sheet, then I suspected there are more better way of doing it. So I came across this tip, it actually suggested 6 ways to do it. So I gave some tries, the result is quite some interesting learning experience. Pls. refer to each sheet of the attached excel file.

The other thing bugged me for quite a while was the last method using Boolean Multiplication, a natural improvement was sumproduct, however I could not get sumproduct(boolean array, score) work, it always returns 0 in Excel 2010, as confirmed in another blog post I found online. After some try and errors, only the 9th sumproduct works.

It's very interesting to see how this method can be hacked to simulate typical select from where SQL query in Excel.

Geocoding in bulk using Excel, via Yahoo and Google map API, and FusionTables

I started to try to use Excel VBA to call Yahoo and Google Map API, it works. See Excel sheet attached. However, when I was trying to plot the locations on the map, using KML layer, it turned out that the simplest way to do geocoding and maping is Google Fusion Tables.
Just import the locations / addresses into a new empty Fusion Table, it will take care of geocoding and the maping in one place.
If only I knew this earlier, but isn't that what ought to be anyway?

Ps. Google Fusion Tables won't export the latitude/longitude coordinates, so the excel file is still useful ;-)

Click here to download:
Google.Yahoo.Geocoding.v1.xls (69 KB)
(download)

Click here to download:
Google.Yahoo.Geocoding.v1.xlsm (33 KB)

定量模型的缺陷

定量模型最多只能在现有问题定义之内提供量的精确性,单不可能带来根本上的新概念。 而通过模拟(运行)定量模型并加以检验,往往会使我们原先理解现实的头脑模型发生彻底的变化。Simulation加速并加强学习系统反馈,问题是人们玩得太多思考的太少(游戏综合症)。
Sterman quote in Business Dynamics (Lane 1994, how system dynamics and soft OR can learn from each other

&#28404;&#27700;&#35266;&#23431;&#23449; Systems Thinking

Russian Nesting Dolls -Matryoshkas by Odalaigh, on Flickr

Russian Nesting Dolls -Matryoshkas by Odalaigh, on Flickr

W. Blake

To see a World in a Grain of Sand,
And a Heaven in a Wild Flower;

Hold Infinity in the palm of your hand,
And Eternity in an hour.

滴水可观宇宙
万古乾坤一羽毛

佛曰:坐亦禅,行亦禅,一花一世界,一叶一如来,春来花自青,秋至叶飘零,无穷般若心自在,语默动静体自然。

@科学和审美 by Yong