Editing
Google spreadsheet
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== 步驟2. 使用函式,分析使用者的作答結果 === D2, E2, F2 儲存格,輸入的使用函式 <table border="1" style=""> <tr style="background-color: #555555; color: #ffffff;"> <th></th> <th>A</th> <th>B</th> <th>C</th> <th>D</th> <th>E</th> <th>F</th> </tr> <tr> <td>1</td> <td>Timestamp</td> <td>喜愛的冰淇淋口味</td> <td></td> <td>香草</td> <td>牛奶</td> <td>巧克力</td> </tr> <tr> <td>2</td> <td>作答時間</td> <td>牛奶, 巧克力</td> <td></td> <td><div style="background-color: yellow"> =INT( REGEXMATCH(B2, $D$1) ) </div></td> <td><div style="background-color: yellow"> =INT( REGEXMATCH(B2, $E$1) ) </div></td> <td><div style="background-color: yellow"> =INT( REGEXMATCH(B2, $F$1) ) </div></td> </tr> <tr> <td>3</td> <td>作答時間</td> <td>香草, 巧克力</td> <td></td> <td></td> <td></td> <td></td> </tr> </table> D2 儲存格,輸入的使用函式說明 <pre> =INT( REGEXMATCH(答案欄位位置, "選項名稱") ) =INT( REGEXMATCH(B2, "香草") ) 或改成使用「香草」選項名稱,所在的儲存格的絕對參照位址 $D$1 方便之後的維護 =INT( REGEXMATCH(B2, $D$1) ) </pre> REGEXMATCH(B2, "香草"): 分析某位使用者作答結果(例子是 B2 欄位值),如果是香草則回傳 TRUE ,如果不是香草則會回傳 FALSE 。 * 函式語法: RegExMatch( 資料來源 , 搜尋條件/regular_expression ) ** 資料來源: B2 欄位 ** 搜尋條件: "香草" (說明: 如果文字沒有加上引號,會出現「#NAME? error: Unknown range name」錯誤訊息) INT( REGEXMATCH(B2, "香草") ): 如果作答結果中包含香草,欄位值顯示為 1,否則顯示為 0。方便後續的加總。 * 函式語法: INT(邏輯值) ** 當邏輯值是 TRUE ,則會回傳 1,如果邏輯值是 FALSE 則會回傳 0。
Summary:
Please note that all contributions to LemonWiki共筆 are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
LemonWiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Current events
Recent changes
Random page
Help
Categories
Tools
What links here
Related changes
Special pages
Page information