[[20221126000240]]@wstep ‚Μ‹@”\‚π‚€‚ά‚­‘ŠŽE‚Ε‚«‚Θ‚’xi”ͺ‰Ζj@ƒy[ƒW‚ΜΕŒγ‚Ι”ς‚Τ

[ ‰‚ί‚Δ‚Μ•ϋ‚Φ | ˆκ——(ΕVXV‡) |

| ‘S•ΆŒŸυ | ‰ί‹ŽƒƒO ]

@

wstep ‚Μ‹@”\‚π‚€‚ά‚­‘ŠŽE‚Ε‚«‚Θ‚’xi”ͺ‰Ζj

`sheet1`

  A	B	C@
1 a			
2 			
3 b
4
5 c
6	

`sheet2`

  A	B	C
1 a	b	c	
2			
3

‚’‚Β‚ΰ‚¨’˜b‚Ι‚Θ‚Α‚Δ‚¨‚θ‚ά‚·B
Δ“xŽΏ–β‚΅‚½‚­“Še‚΅‚ά‚΅‚½B
γ‹L‚Μ‚ζ‚€‚ΘƒV[ƒg‚ͺ2–‡‚ ‚ι‚Ζ‚΅‚ά‚·B
“Α’₯“I‚Θ‚Μ‚ͺAƒV[ƒg‚P‚Ι‚Νƒf[ƒ^‚ͺ1ƒZƒ‹–ˆ‚Ι”ς‚ρ‚Ε‚’‚ι‚Ζ‚’‚€‚±‚Ζ‚Ε‚·B
‚±‚κ‚πƒ{ƒ^ƒ“‚π‰Ÿ‚΅‚āAγ‹L‚Μ‚ζ‚€‚ɁAƒV[ƒg2‚ɁA‚·‚«‚ά‚Θ‚­ƒRƒs[‚΅‚½‚’‚ƍl‚¦‚Δ‚’‚ι‚Μ‚Ε‚·‚ͺA‚€‚ά‚­ƒ}ƒNƒ‚ͺ‘‚―‚ά‚Ή‚ρB
ˆΘ‰ΊAƒR[ƒhB

FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
Sub ƒ{ƒ^ƒ“1_Click()
Sub ƒ{ƒ^ƒ“1_Click()

    Set ws1 = Sheets("sheet1")
    Set ws2 = Sheets("sheet2")
    Dim i As Integer

    For i = 1 To 1000 Step 1
                    ws2.Cells(2, i).Value = ws1.Cells(i, 1).Value

    Next i

End Sub

FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF

Šm‚©‚Ιˆκ‰ρ–Ϊ‚Ν‚’‚’‚Μ‚Ε‚·‚ͺA2‰ρ–ΪˆΘ~‚Ν‚±‚ΜƒXƒeƒbƒv{‚Pˆ—‚ͺŽΧ–‚‚΅‚āAŽΐΫ‚́AƒV[ƒg2‚Ι‚¨‚’‚Δ‚ΰˆκ‚Β‚Ζ‚Ρ‚Ι‚Θ‚Α‚Δ‚΅‚ά‚’‚ά‚·B
2‰ρ–ΪˆΘ~‚Μstep‚́{‚P‚π‘Ε‚ΏΑ‚΅•ϋ‚ͺ‚Η‚€‚΅‚Δ‚ΰ‚Ύ‚ί‚Ε‚΅‚½B
‚·‚’‚ά‚Ή‚ρ‚ͺA‚²‹³Žφ‚π‚¨Šθ‚’‚’‚½‚΅‚ά‚·B

ƒ Žg—p ExcelFExcel2019AŽg—p OSFWindows10 „


•Ο‰»‚³‚Ή‚Δ‚’‚­”’l‚π•ΐ‚ׂď‘‚«o‚΅‚ά‚·B

 Sheet1‚̍s”ԍ†   1  3  5  7  9  11 EEE
 Sheet2‚Μ—ρ”ԍ†   1  2  3  4  5   6 EEE

—Ό•ϋ‚©‚η1‚πˆψ‚­‚Ζ

 Sheet1‚̍s”ԍ†‚©‚η1ˆψ‚’‚½”   0  2  4  6  8  10 EEE
 Sheet2‚Μ—ρ”ԍ†‚©‚η1ˆψ‚’‚½”   0  1  2  3  4   6 EEE

‹K‘₯«‚ͺŒ©‚Β‚©‚θ‚ά‚Ή‚ρ‚©H

 Sheet1‚̍s”ԍ†Sheet2‚Μ—ρ”ԍ†✕2-1

‚Ε‚·
i‚Π‚ρ‚Ɓj 2022/11/26(“y) 01:41:04


 •Ο”‚πƒPƒ`‚η‚Έ‚ΙŽg‚’‚ά‚΅‚ε‚€B 

 Sub ƒ{ƒ^ƒ“1_Click()
    Dim ws1 As Worksheet, ws2 As Worksheet
    Dim i As Long, j As Long

    Set ws1 = Sheets("sheet1")
    Set ws2 = Sheets("sheet2")
    For i = 1 To 1000 Step 2
        j = j + 1
        ws2.Cells(1, j).Value = ws1.Cells(i, 1).Value
    Next i
 End Sub

iŠm”Fj 2022/11/26(“y) 05:17:00


‹σ”’sˆΘŠO‚ΕƒtƒBƒ‹ƒ^[‚π‚©‚―‚āAs—ρ‚π“ό‚κ‘Φ‚¦‚Δ“\‚θ•t‚―

 Sub test()
     Dim ws1 As Worksheet, ws2 As Worksheet
     Dim LastR As Long
     Set ws1 = Sheets("sheet1")
     Set ws2 = Sheets("sheet2")
     ws1.Rows(1).EntireRow.Insert    'ƒtƒBƒ‹ƒ^[‚Μ‚½‚ί‚ΜŒ©o‚΅s‘}“ό
     LastR = ws1.Cells(Rows.Count, 1).End(xlUp).Row
     With ws1.Range("A1")
         .Value = "Œ©o‚΅"
         .Resize(LastR).AutoFilter 1, "<>"   '‹σ”’ˆΘŠO‚π’Šo
         .CurrentRegion.Offset(1, 0).Resize(LastR - 1).Copy
         ws2.Range("A1").PasteSpecial xlPasteValues, Transpose:=True     's—ρ‚π“ό‚κ‘Φ‚¦‚Δ“\‚θ•t‚―
         .AutoFilter
         .EntireRow.Delete   'Œ©o‚΅sνœ
     End With
 End Sub
iƒtƒH[ƒL[j 2022/11/26(“y) 07:25:45

 >ws1.Rows(1).EntireRow.Insert 
 ws1.Rows(1).Insert
 ‚ɏC³‚΅‚Δ‚­‚Ύ‚³‚’B
iƒtƒH[ƒL[j 2022/11/26(“y) 07:58:02

ŠF—l@‚²‹³Žφ‚ ‚θ‚ͺ‚Ζ‚€‚²‚΄‚’‚ά‚·B
Eƒqƒ“ƒg—l@Šm‚©‚Ι–@‘₯«‚ͺ‚ ‚θ‚ά‚΅‚½B‚ ‚θ‚ͺ‚Ζ‚€‚²‚΄‚’‚ά‚·B
EŠm”F—l@•Ο”‚π‚ΰ‚€ˆκŒΒŽg‚¦‚Ξ‚ζ‚©‚Α‚½‚ρ‚Ε‚·‚ˁA‚±‚ρ‚ΘŽg‚’•ϋ‚ͺ‚ ‚ι‚Ƃ́EE‚ ‚θ‚ͺ‚Ζ‚€‚²‚΄‚’‚ά‚·B
EƒtƒH[ƒL[—l@‚±‚±‚܂ōׂ©‚­ƒR[ƒh‚πμ‚Α‚Δ‚’‚½‚Ύ‚«‚ ‚θ‚ͺ‚Ζ‚€‚²‚΄‚’‚ά‚·Bs—ρ‚Μ“ό‚κ‘Φ‚¦‚Ζ‚’‚€”­‘z‚ͺΆ‚ά‚κ‚ά‚Ή‚ρ‚Ε‚΅‚½B
@‚¨ŽO•ϋA–{“–‚Ι‚ ‚θ‚ͺ‚Ζ‚€‚²‚΄‚’‚ά‚΅‚½B

i”ͺ‰Ζj 2022/11/26(“y) 08:42:39


ƒRƒƒ“ƒg•ΤMF

[ ˆκ——(ΕVXV‡) ]


YukiWiki 1.6.7 Copyright (C) 2000,2001 by Hiroshi Yuki. Modified by kazu.