Skip to Content
エクセル・クックブック
book

エクセル・クックブック

by Dawn Griffiths
March 2025
Beginner to intermediate
592 pages
7h 52m
Japanese
O'Reilly Media, Inc.
Content preview from エクセル・クックブック

第4章 数学と工学 数学と工学

この作品はAIを使って翻訳されている。ご意見、ご感想をお待ちしている:translation-feedback@oreilly.com

Excelには豊富な関数が用意されており、面倒な手計算の手間を省くことができる。

この章では、+-*/^ の演算子を超えて、Excel の数学と工学の数式をガイドする。レシピには、数値の丸め方、和、倍数、除数の扱い方、三角法の使い方、順列と組み合わせの計算、行列を使った問題の解き方、複素数の扱い方などが含まれる。

4.1 数字を生成する

問題

ランダムまたは数列で数字を生成したい。

解決策

0以上1未満のランダムな10進数を生成するには、RAND 関数を使用する。 =RAND().a以上b以下の乱数を返すには、この式を微調整して次のようにする。 =RAND()*(b-a)+a.と入力する。 =RAND()*100と入力すると、0以上100未満の乱数を返す。

aから bの間のランダムな整数を生成するには、RANDBETWEEN 関数を使用する。一般的には、次の式を使用する。 =RANDBETWEEN(a, b)を使用する。 =RANDBETWEEN(1, 10)を入力すると、1から10までの整数を返す。

乱数の動的配列(レシピ3.4参照)を生成するには、以下の式を使用する。 =RANDARRAY(rows, columns, min, max, integer)ここで rows(オプション) は行数(デフォルトは1)、 columns(オプション) は列数 (デフォルトは 1)、 min(オプション)は、返す可能性のある最小の数(デフォルトは0)である、 max(オプション)は最高値(デフォルトは1)、そして integerは整数と小数のどちらを返すかを指定する。整数の場合はTRUE 、小数の場合はFALSE (デフォルト)を使用する。つまり =RANDARRAY(6)と入力すると、0から1(を含む)の間のランダムな10進数を6行返す。 =RANDARRAY(5, , 1, 10, TRUE)と入力すると、1から10(を含む)までの5行のランダムな整数が返される。

連番の動的配列を生成するには、次の式を使う。 =SEQUENCE​(rows, columns, start, step)ここで rows(オプション)は行数(デフォルトは1)、 columns(オプション) はの列数(デフォルトは1)である、 start(オプション) は数列の最初の数(デフォルトは1)、そして step(オプション)は、それ以降の数値をインクリメントする数値である(デフォルトは1)。つまり =SEQUENCE(6)と入力すると、1から6までのコンテナを含む6行が返される。 =SEQUENCE(5, , 0, 0.2)と入力すると、0、0.2、0.4、0.6、0.8を含む5行が返される。

警告

RANDARRAYSEQUENCE 関数は、Excel 2021 と Excel 365 でのみ利用できる。

ディスカッション

このレシピでは、Excelのバージョンに応じて数値を生成するメソッドをいくつか用意している。テキスト文字の生成(レシピ5.3と5.4を参照)など、さまざまな場面で使うことができる。

こちらも参照のこと。

乱数を生成する他の方法については、レシピ9.9を参照のこと。

4.2 テキストやブールを数値に変換する

問題

テキストまたはTRUE/FALSE ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

はじめての知識グラフ構築ガイド

はじめての知識グラフ構築ガイド

Jesus Barrasa, Jim Webber
MySQL管理ハンズオン

MySQL管理ハンズオン

Arunjith Aravindan, Jeyaram Ayyalusamy

Publisher Resources

ISBN: 9798341626973