advanced help
per page, with , order by , clip by
Results of 1 - 1 of about 3686 for グラフ (0.002 sec.)
[[20210802131015]]
#score: 3272
@digest: a49aed07cc09bc270239acbddf2cfc97
@id: 88541
@mdate: 2021-08-03T11:39:32Z
@size: 11902
@type: text/plain
#keywords: 402235 (135786), loops (38796), ー1 (30895), continued (29633), 月1 (28597), strjoin (17876), first (15351), strtitle (14016), strcell (13128), サー (12581), 工用 (12413), タム (9896), 日0 (9010), ーバ (8867), graph (8776), 用変 (8179), 系列 (6492), ラフ (6006), 日8 (5782), 日7 (5660), weight (5416), グラ (5397), 定. (5328), 日6 (5269), number (4776), フ作 (4422), 日5 (4346), 日4 (3949), 、no (3631), 日3 (3493), 99 (3478), (タ (3407)
『グフラチャートの追加』(タム)
今あるグラフに新しくチャート,い(データ系列追加)(X軸)を追加したいのですが、実行時エラー2147024809がでてしまい困っております。 どなたかご教示お願いします。 ※やりたいこと 1列づつデータを読み取り列が無くなるまで、グラフ化する B列のデータにY軸の項目が並んでいるので、(24、25、26など) このB列の24の範囲25の26範囲25でグラフを作成したい。 以下コード '###変数定義### 'グラフ作成用ループカウンター Dim i As Long Dim x As Long Dim aa As Long 'ワークシート処理用 Dim WS As Worksheet '最終列取得 Dim EndCol As Long 'ワークシート代入用変数 Dim sh As Worksheet 'データ加工用変数 Dim Space As String Dim str As String Dim strCell As String Dim strTitle As String Dim strJoin As String Dim ME_ID As String '選択CELL数を取得 Dim Number_loops As Long '範囲指定用処理 '可視化セルの先頭行と最終行を取得 Dim First_Row As String Dim Lost_Row As String '日付計算 Dim Date_weight As Long Public Sub MakiGraph() '「graph」の有無を確認しなければ作成しデータを削除 Delete_sheet 'ワークシートアクティブ Worksheets.Add ActiveSheet.Name = "graph" Sheets("graph").Activate 'シート指定用変数 Set sh = Sheets("data") sh.Columns("C").NumberFormat = "m月d日" sh.Columns("D").NumberFormat = "h" '可視化セルの範囲を習得 With sh If Not .AutoFilterMode Then Exit Sub With Intersect(.AutoFilter.Range.Resize(.AutoFilter.Range.Rows.Count - 1).Offset(1), .Columns("B")).SpecialCells(xlCellTypeVisible) First_Row = .Areas(1).Row Lost_Row = .Areas(.Areas.Count).Rows(.Areas(.Areas.Count).Rows.Count).Row End With End With 'グラフ作成に必要な最終列を取得 EndCol = sh.Cells(2, Columns.Count).End(xlToLeft).Column '日付計算 Date_weight = 1 For aa = First_Row To Lost_Row Step 25 If sh.Cells(aa, "B").Text = sh.Cells(aa + 24, "B").Text Then Date_weight = Date_weight + 1 Else 'Number_loops = Number_loops + 1 Exit For End If Next aa '選択CELL数を取得 Number_loops = 1 For aa = First_Row To Lost_Row Step 25 If sh.Cells(aa, "B").Text = sh.Cells(aa + 24, "B").Text Then Else Number_loops = Number_loops + 1 End If Next aa 'マイナス1を行うことで最後の一行を削除 Number_loops = Number_loops - 1 Debug.Print (Date_weight) Debug.Print (Number_loops) '###########グラフ作成 '初期値 セル[F1]の No1_接続成功率(発信+着信)から開始するため '外ループグラフを一項目づつ作成するためのループ x = 6 'グラフ加工用処理 Space = " " str = "CELL_" Continued = 2 ME_ID = sh.Cells(2, 1).Text For aa = 1 To Number_loops For i = 6 To EndCol 'グラフタイトル加工用処理 strCell = sh.Cells(First_Row, 2).Text strTitle = sh.Cells(1, x).Text strJoin = ME_ID + Space + str + strCell + Space + strTitle With ActiveSheet.Shapes.AddChart.Chart 'グラフ種類設定 .ChartType = xlLine 'グラフ範囲指定 .SetSourceData Source:=Union(sh.Range(sh.Cells(First_Row, 3), sh.Cells(First_Row + (23 * Date_weight), 4)), _ sh.Range((sh.Cells(First_Row, x).Address), sh.Cells(First_Row + (23 * Date_weight), x).Address)) 'グラフタイトル表示 .HasTitle = True 'タイトル文字列設定 .ChartTitle.Text = strJoin '凡例を削除 .Legend.Delete 'グラフ位置の設定 .Parent.Top = Range("A" & (((Continued) - 2) * 28 + 2)).Top .Parent.Left = Range("A" & (((Continued) - 2) * 15 + 2)).Left End With '###新規追加 ここから '「2つ目の系列」を追加 With ActiveSheet.ChartObjects(1).Chart.SeriesCollection.NewSeries .Name = Range("C1") '系列名 .Values = Range("C2:C4") 'データ範囲 End With '「3つ目の系列」を追加 With ActiveSheet.ChartObjects(1).Chart.SeriesCollection.NewSeries .Name = Range("D1") '系列名 .Values = Range("D2:D4") 'データ範囲 End With 'グラフサイズ設定 With ActiveSheet.ChartObjects .Height = 500 .Width = 1400 End With '###新規追加 ここまで 'グラフ項目移動用カウンター x = x + 1 'グラフ位置移動用変数 Continued = Continued + 1 'ループ終了 Next i 'グラフ項目カウンター初期化 x = 6 First_Row = First_Row + (24 * Date_weight) 'appSet Next aa 'シートを移動 Moving_seat End Sub Public Sub Moving_seat() '###シート位置変更### 'graphシートを一番左に移動 Worksheets("graph").Move Before:=Worksheets(1) 'linegraph_createシートを一番右に移動 Worksheets("起動ボタン").Move After:=Worksheets(Worksheets.Count) 'graphシートを前面表示 Sheets("graph").Select MsgBox "完了しました" End Sub 'Call Delete_sheet Public Sub Delete_sheet() ' 処理内容 '「graph」の有無を確認しなければ作成しデータを削除 For Each WS In Worksheets If WS.Name = "graph" Then Application.DisplayAlerts = False WS.Delete Application.DisplayAlerts = True Exit For End If Next WS End Sub < 使用 Excel:Office365、使用 OS:Windows10 > ---- https://detail.chiebukuro.yahoo.co.jp/qa/question_detail/q11247033246?__ysp=44Kw44Op44OVIOaVo%2BW4g%2BWbsyDjg4Hjg6Pjg7zjg4gg44OS44K544OI44Kw44Op44Og 向こうは禁止だったと思うけどな。 (なまけもの) 2021/08/02(月) 14:53 ---- [マルチポストについて] [multipost] 当サイトではマルチポスト(他の掲示板に同じ内容を書くこと)は 基本的に禁止していません 「マルチポストで何であれ、自由に質問して、自由に答えて、みんなで学んで解決してゆこう」 という考え方です この項目があったので、複数で投稿しました。 (タム) 2021/08/02(月) 16:59 ---- 知恵袋もそうならごめんなさい。 (なまけもの) 2021/08/02(月) 17:20 ---- どんなデータから、どんなグラフを作成したいのか理解できません。 まずは、サンプルデータを提示してください。 (マナ) 2021/08/02(月) 18:38 ---- 失礼しました。 以下データとなります。 ID_2のデータ(64、65、66)を使用してこの範囲を一つのグラフに表示させたいです。 ID_1 ID_2 DAY TIME NAME No1 No2 No3 No4 No5 No6 No7_ No8 402235 64 7月1日 0 サーバー1 99.985 1904 1904 100 99.746 98.901 9 402235 64 7月1日 1 サーバー1 99.966 1224 1224 100 99.713 97.531 2 402235 64 7月1日 2 サーバー1 99.806 2650 2650 100 99.793 98.113 33 402235 64 7月1日 3 サーバー1 100 1150 1150 100 99.734 100 9 402235 64 7月1日 4 サーバー1 100 59 59 100 100 92.857 1 402235 64 7月1日 5 サーバー1 100 1127 1127 99.817 100 100 0 402235 64 7月1日 6 サーバー1 99.932 609 609 99.803 99.673 100 3 402235 64 7月1日 7 サーバー1 99.96 1326 1326 99.947 99.633 99.618 15 402235 64 7月1日 8 サーバー1 99.93 1775 1775 100 99.543 100 20 402235 65 7月1日 0 サーバー1 100 1487 1487 100 99.302 100 5 402235 65 7月1日 1 サーバー1 100 373 373 99.885 99.343 100 1 402235 65 7月1日 2 サーバー1 99.967 668 668 100 98.884 100 6 402235 65 7月1日 3 サーバー1 100 730 730 100 98.599 100 1 402235 65 7月1日 4 サーバー1 99.981 70 70 99.804 96.875 100 4 402235 65 7月1日 5 サーバー1 99.982 2031 2031 99.863 98.771 100 2 402235 65 7月1日 6 サーバー1 99.953 1490 1490 100 99.707 99.231 4 402235 65 7月1日 7 サーバー1 99.948 1039 1039 99.072 99.781 98.824 7 402235 65 7月1日 8 サーバー1 99.935 2484 2484 99.92 99.354 99.701 36 402235 66 7月1日 0 サーバー1 100 1661 1661 99.831 99.451 100 7 402235 66 7月1日 1 サーバー1 100 122 122 100 99.726 100 5 402235 66 7月1日 2 サーバー1 100 66 66 99.59 100 100 5 402235 66 7月1日 3 サーバー1 100 238 238 100 100 100 8 402235 66 7月1日 4 サーバー1 100 46 46 100 99.471 100 5 402235 66 7月1日 5 サーバー1 100 423 423 99.718 100 100 10 402235 66 7月1日 6 サーバー1 99.974 491 491 99.89 99.76 96 9 402235 66 7月1日 7 サーバー1 99.917 2582 2582 100 99.683 97.143 10 402235 66 7月1日 8 サーバー1 99.526 2902 2902 99.776 100 96.38 12 (タム) 2021/08/02(月) 18:59 ---- >ID_2のデータ(64、65、66)を使用してこの範囲を一つのグラフに表示させたいです。 もう少し、丁寧に説明していただけませんか。 どんなグラフを作成すればよいのかわかりません。 (マナ) 2021/08/02(月) 19:11 ---- 失礼しました。 グラフ種類は折れ線グラフで、以下のような形にしていきたいです。 B列のID_64、65、66この3つのデータを使用してNO1でグラフ作成、NO2でグラフ作成、NO3でグラフ・・・以下列のデータがなくなるまで作成。 (タム) 2021/08/02(月) 19:41 ---- [[20210715095352]] 『VBAでグラフの範囲を変更しながら、連続作成』(タム) (こっちはどうなった) 2021/08/02(月) 19:51 ---- まだ、よくわかりません。 縦軸(値軸)は、No,1〜No,8だとして 横軸(項目軸)は、どの洌を使用するのでしょうか? (マナ) 2021/08/02(月) 20:29 ---- 度々申し訳ございません。 横軸にはC列の日付とD列の時間を使用いたします。 DAY TIME 7月1日 0 7月1日 1 7月1日 2 7月1日 3 7月1日 4 7月1日 5 7月1日 6 7月1日 7 7月1日 8 7月1日 9 7月1日 10 7月1日 11 7月1日 12 7月1日 13 7月1日 14 7月1日 15 7月1日 16 7月1日 17 7月1日 18 7月1日 19 7月1日 20 7月1日 21 7月1日 22 7月1日 23 7月1日 0 7月1日 1 7月1日 2 7月1日 3 7月1日 4 7月1日 5 7月1日 6 7月1日 7 7月1日 8 7月1日 9 7月1日 10 7月1日 11 7月1日 12 7月1日 13 7月1日 14 7月1日 15 7月1日 16 7月1日 17 7月1日 18 7月1日 19 7月1日 20 7月1日 21 7月1日 22 7月1日 23 7月1日 0 7月1日 1 7月1日 2 7月1日 3 7月1日 4 7月1日 5 7月1日 6 7月1日 7 7月1日 8 7月1日 9 7月1日 10 7月1日 11 7月1日 12 7月1日 13 7月1日 14 7月1日 15 7月1日 16 7月1日 17 7月1日 18 7月1日 19 7月1日 20 7月1日 21 7月1日 22 7月1日 23 (タム) 2021/08/02(月) 21:02 ---- ↑D洌の値が、2021/08/02(月) 18:59 のと違うのはなぜ? 系列の数(折れ線の数)は、No.1〜8で、8本ですか それとも、8×3で、24本ですか (マナ) 2021/08/02(月) 21:27 ---- 失礼しました。 本来は24時間なので、下のデータが正しいのですが、表示をわかりやすくするために、上のデータは0時から8時までしか表示させておりません。 (タム) 2021/08/02(月) 21:30 ---- 系列の数(折れ線の数)は、No.1〜8で、8本ですか それとも、8×3で、24本ですか (マナ) 2021/08/02(月) 23:10 ---- 系列の数はいつのグラフに3です。ID_2のデータ(64、65、66) ID_2のデータとNO1のデータを使用して1つのグラフに折れ線グラフで表示させたいのです。 そしてID_2のデータ(64、65、66)とNO2のデータでグラフを作成・・・と列がなくなくなるまで作成していきたいのです。 Y軸のID_2のデータ(64、65、66) X軸→これはループ回して、列がなくなるまで。 (タム) 2021/08/02(月) 23:36 ---- No毎に、8個のグラフで 各グラフに、系列が3つずつ 系列名は、ID_2 ということでしょうか? >Y軸のID_2のデータ(64、65、66) >X軸→これはループ回して、列がなくなるまで。 Y軸とかX軸の意味がわかりません。 (マナ) 2021/08/03(火) 07:43 ---- 各グラフに、系列が3つずつ 系列名は、ID_2 上記の2つのご認識は正しいのですが、「No毎に、8個のグラフで」ではなく、No毎に1個のグラフになります。 NO1のグラフに系列が3つ、NO2のグラフに系列が3つ、NO3のグラフに系列が3つ・・・と最終列がなくなるまで、作成していきたいのです。 (タム) 2021/08/03(火) 09:42 ---- こちらの質問ですが、クローズとさせてください。 ご助力ありがとうございました。 (タム) 2021/08/03(火) 20:39 ...
http://www.excel.studio-kazu.jp/wiki/kazuwiki/202108/20210802131015.txt - [detail] - similar
PREV NEXT
Powered by Hyper Estraier 1.4.13, with 97009 documents and 608122 words.

訪問者:カウンタValid HTML 4.01 Transitional