SlideShare une entreprise Scribd logo
1  sur  39
Excel
        2012/01/23
:

^(d{3}[357])(.*?)      (.*?)    (([0-9a-zA-Z ]+?))(.*   )$


12    3    (1_4_3)5


S

([0-9]{3}(3|5|7))>(.*)         (.*)   ((.*))(.*)


1>2    3    (1_4_3)5


T

^([0-9]{3}[357])(..*?         )(..*)(   .*()([0-9a-zA-Z ]*)().*   )$


$1$2$3$4$1_$5_$3$6
[   ]
[   ]
[        ]



=>
             /




[    ]
=>
Alt+F11           VBA


                  [                ]
      Module1


(         Mac                Win
[             ]             [???????]   )
Sub Macro1()
'
' Macro1 Macro
'
    Range("C3").Select
    ActiveCell.FormulaR1C1 = "foo"

    Columns("D:D").Select
    Selection.Insert _
    Shift:=xlToRight,CopyOrigin:=xlFormatFromLeftOrAbove

    Range("A1").Select

    Cells.Find(What:="foo", After:=ActiveCell, LookIn:=xlFormulas,
    LookAt:= xlPart, SearchOrder:=xlByRows, _
    SearchDirection:=xlNext, MatchCase:=False, _
    MatchByte:=False, SearchFormat:=False).Activate

End Sub

                     1. C3   ”foo”
                     2. D
                     3. “foo”
Sub              (<arg *optional>)


      <         >


End Sub




(                                       )


      : Sub          Function         VBA             xls


          =Foo(A1)                   Function “Foo”
http://www.asahi-net.or.jp/~ef2o-inue/vba_k/
sub04_020.html
VBA
Dim   i As Integer
Dim   columnInternal As String
Dim   columnInvoicedAmt As Double
Dim   rowNum As Boolean
Dim   tmp As Variant

Dim <      > As <       >




          Option Explicit




http://www.asahi-net.or.jp/~ef2o-inue/vba_k/sub04_040.html
http://www.asahi-net.or.jp/~ef2o-inue/vba_k/sub04_050_06.html
(                     )
   Integer               String

   Long                  Date

   Single                Object

   Double                Variant

   Currency              Boolean




http://excelvba.pc-users.net/fol5/5_2.html
=


a = 100
                a        100
                     a ← 100
          a              100


    i = i + 1
      i                    i    1
 :i = 2             i = i + 1        i = 3



http://home.att.ne.jp/zeta/gen/excel/c04p22.htm
If   (   )
(     )
=:     =:

+:     <>:

-:     >:

*:     >=:

/:     <:

mod:   <=:

^:
if
(if                                 )
If        1 Then
           1
ElseIf          2 Then
           2
Else
           1          2
End If
*ElseIf        Else



http://excelvba.pc-users.net/index.html
   6



http://excelvba.pc-users.net/fol6/6_1.html
http://www.asahi-net.or.jp/~ef2o-inue/vba_k/sub04_050_02.html
:
If Cells(1,1).Value = 1 Then
     Cells(1,2).Value = “Foo”
ElseIf Cells(1,1).Value = 2 Then
     Cells(1,2).Value = “bar”
Else
     Cells(1,2).Value = “hoge”
End If

         Cells(1,1) (    A1)          -
1         Cells(1,2) (    B1)             “Foo”
2         Cells(1,2) (    B1)             “bar”
              Cells(1,2) (      B1)           “hoge”



ElseIf
(                                                      )
For   Next
(      if
              )


For               =   To


Next

        For                          i    j




http://excelvba.pc-users.net/fol6/6_3.html
http://www.sigoto.co.jp/excel/statement/state09.htm
(For each    Next                        )
:
Dim i As Integer

For i = 1 To 10
     Cells(i, 1).Value = i * 10
     i = i + 1
Next



        i   1           i
(                           )
For i = 1 To 10     Next        i    1     10


Cells(i, 1).Value = i * 10          Cells(i, 1)   i*10
i = i + 1       i   1                                    ”   i
+ 1”
(   2:30...)
xciConvert.xlsm
Alt+F11   VBA


   Before.xls     After.xls
Client          Project Number          Client

Internal %                        %        (+        )

Vendor %                          (+             )

Invoiced Amt       Project Total
      Invoiced Amount    0

Invoiced Amt

GM

Client Name    BU Name       CompDate     BDM

GM%

         :
3
/
Left
http://officetanaka.net/excel/vba/function/Left.htm

InStr
http://officetanaka.net/excel/vba/function/InStr.htm

Offset
http://officetanaka.net/excel/function/function/
offset.htm

CSng
http://officetanaka.net/excel/vba/function/CSng.htm


http://officetanaka.net/excel/vba/function/index.htm
Web
http://officetanaka.net/excel/

http://www.asahi-net.or.jp/~ef2o-inue/menu/
menu04.html

http://www.asahi-net.or.jp/~ef2o-inue/menu/
menu05.html

http://excelvba.pc-users.net/index.html


                     VBA             Web
                                  VBA xxxx
xciConvert.xlsm


Client                 ProjDate
Client                                  A       B
                    Client


         ProjDate                     Project
Number
netapp_1101_008-02 (              )
Excelマクロはじめの一歩

Contenu connexe

Tendances

Евгений Курбацкий. Зачем нужны зависимые типы
Евгений Курбацкий. Зачем нужны зависимые типыЕвгений Курбацкий. Зачем нужны зависимые типы
Евгений Курбацкий. Зачем нужны зависимые типы
Andrey Vlasovskikh
 

Tendances (20)

C++ Programming - 1st Study
C++ Programming - 1st StudyC++ Programming - 1st Study
C++ Programming - 1st Study
 
PostgreSQL Quiz
PostgreSQL QuizPostgreSQL Quiz
PostgreSQL Quiz
 
Pegomock, a mocking framework for Go
Pegomock, a mocking framework for GoPegomock, a mocking framework for Go
Pegomock, a mocking framework for Go
 
Exception Example in Python
Exception Example in PythonException Example in Python
Exception Example in Python
 
Stl algorithm-Basic types
Stl algorithm-Basic typesStl algorithm-Basic types
Stl algorithm-Basic types
 
C Programming Language Step by Step Part 5
C Programming Language Step by Step Part 5C Programming Language Step by Step Part 5
C Programming Language Step by Step Part 5
 
変数の型 - Java 演習
変数の型 - Java 演習 変数の型 - Java 演習
変数の型 - Java 演習
 
Burrowing through go! the book
Burrowing through go! the bookBurrowing through go! the book
Burrowing through go! the book
 
C Programming Language Part 4
C Programming Language Part 4C Programming Language Part 4
C Programming Language Part 4
 
Code
CodeCode
Code
 
20180721 code defragment
20180721 code defragment20180721 code defragment
20180721 code defragment
 
Import data from csv excel file and export to xml excel file in c programming
Import data from csv excel file and export to xml excel file in c programmingImport data from csv excel file and export to xml excel file in c programming
Import data from csv excel file and export to xml excel file in c programming
 
20180310 functional programming
20180310 functional programming20180310 functional programming
20180310 functional programming
 
Basic use of Python
Basic use of PythonBasic use of Python
Basic use of Python
 
How the stack works(1)
How the stack works(1)How the stack works(1)
How the stack works(1)
 
Евгений Курбацкий. Зачем нужны зависимые типы
Евгений Курбацкий. Зачем нужны зависимые типыЕвгений Курбацкий. Зачем нужны зависимые типы
Евгений Курбацкий. Зачем нужны зависимые типы
 
Data Structure - 2nd Study
Data Structure - 2nd StudyData Structure - 2nd Study
Data Structure - 2nd Study
 
20181020 advanced higher-order function
20181020 advanced higher-order function20181020 advanced higher-order function
20181020 advanced higher-order function
 
Integers slidecast
Integers slidecastIntegers slidecast
Integers slidecast
 
OREO - Hack.lu CTF 2014
OREO - Hack.lu CTF 2014OREO - Hack.lu CTF 2014
OREO - Hack.lu CTF 2014
 

En vedette (8)

ピボットテーブル02
ピボットテーブル02ピボットテーブル02
ピボットテーブル02
 
How to use hiatus
How to use hiatusHow to use hiatus
How to use hiatus
 
Excelマクロ 2
Excelマクロ 2Excelマクロ 2
Excelマクロ 2
 
正規表現のいろは
正規表現のいろは正規表現のいろは
正規表現のいろは
 
TTX+tools
TTX+toolsTTX+tools
TTX+tools
 
ピボットテーブル01
ピボットテーブル01ピボットテーブル01
ピボットテーブル01
 
Rubyスクリプト
RubyスクリプトRubyスクリプト
Rubyスクリプト
 
AdvancedなExcel活用講習会
AdvancedなExcel活用講習会AdvancedなExcel活用講習会
AdvancedなExcel活用講習会
 

Similaire à Excelマクロはじめの一歩

Similaire à Excelマクロはじめの一歩 (20)

Functions In Scala
Functions In Scala Functions In Scala
Functions In Scala
 
A Few of My Favorite (Python) Things
A Few of My Favorite (Python) ThingsA Few of My Favorite (Python) Things
A Few of My Favorite (Python) Things
 
Idioms in swift 2016 05c
Idioms in swift 2016 05cIdioms in swift 2016 05c
Idioms in swift 2016 05c
 
functions
functionsfunctions
functions
 
Funkcija, objekt, python
Funkcija, objekt, pythonFunkcija, objekt, python
Funkcija, objekt, python
 
T3chFest 2016 - The polyglot programmer
T3chFest 2016 - The polyglot programmerT3chFest 2016 - The polyglot programmer
T3chFest 2016 - The polyglot programmer
 
Swift Rocks #2: Going functional
Swift Rocks #2: Going functionalSwift Rocks #2: Going functional
Swift Rocks #2: Going functional
 
Functions, Types, Programs and Effects
Functions, Types, Programs and EffectsFunctions, Types, Programs and Effects
Functions, Types, Programs and Effects
 
Scalapeno18 - Thinking Less with Scala
Scalapeno18 - Thinking Less with ScalaScalapeno18 - Thinking Less with Scala
Scalapeno18 - Thinking Less with Scala
 
Mcq cpup
Mcq cpupMcq cpup
Mcq cpup
 
NetPonto - The Future Of C# - NetConf Edition
NetPonto - The Future Of C# - NetConf EditionNetPonto - The Future Of C# - NetConf Edition
NetPonto - The Future Of C# - NetConf Edition
 
C cheat sheet for varsity (extreme edition)
C cheat sheet for varsity (extreme edition)C cheat sheet for varsity (extreme edition)
C cheat sheet for varsity (extreme edition)
 
Clojure Intro
Clojure IntroClojure Intro
Clojure Intro
 
ClojureScript loves React, DomCode May 26 2015
ClojureScript loves React, DomCode May 26 2015ClojureScript loves React, DomCode May 26 2015
ClojureScript loves React, DomCode May 26 2015
 
Elixir @ Paris.rb
Elixir @ Paris.rbElixir @ Paris.rb
Elixir @ Paris.rb
 
Functional programming
Functional programmingFunctional programming
Functional programming
 
ZIO: Powerful and Principled Functional Programming in Scala
ZIO: Powerful and Principled Functional Programming in ScalaZIO: Powerful and Principled Functional Programming in Scala
ZIO: Powerful and Principled Functional Programming in Scala
 
Computer science ms
Computer science msComputer science ms
Computer science ms
 
Elixir formatter Internals
Elixir formatter InternalsElixir formatter Internals
Elixir formatter Internals
 
Rethink programming: a functional approach
Rethink programming: a functional approachRethink programming: a functional approach
Rethink programming: a functional approach
 

Dernier

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Dernier (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 

Excelマクロはじめの一歩

Notes de l'éditeur

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n