ソスyソスソスソスソスAソスソスソスPソス[ソスgソスソスソスソスソスヘのゑソスソス閧「ソスzソスソスソスIソスナ計5ソスソスソスlソスノ役立つ擾ソスソスミゑソスソスvソスソスソス[ソスソスソスgソスI

ソスZソスソスソスソスソスソスソスsソスソスソス除ソスソスソスソスbExcel VBA

ソスZソスソスソスソスソスソスヨ連ソスフテソスNソスjソスbソスN

ソスZソスソスソスソスソスソスソスsソスソスソス除ソスソスソスソス

(Excel 2000/2002/2003/2007/2010/2013/2016)

ソスmAltソスnソス{ソスmEnterソスnソスLソス[ソスナセソスソスソスソスソスソスソスsソスソスソスsソスソスソスニ、ソスソスソスsソスRソス[ソスhvbLf(ソスソスソスCソスソスソスtソスBソス[ソスソスソスhソスFChr(10)ソスjソスソスソスソスソスヘゑソスソスソスワゑソスソスB
ソスZソスソスソスソスソスソスソスsソスソスソス鼕ソスソスソスト削除ソスソスソスソスノは、RangeソスIソスuソスWソスFソスNソスgソスソスReplaceソスソスソス\ソスbソスhソス利用ソスソスソスワゑソスソスB

Replaceソスソスソス\ソスbソスhソスヘ趣ソスソスフようソスネ構ソスソスソスナ使ソスpソスソスソスワゑソスソスiソスソスソスソスソスヘほゑソスソスノゑソスソスソスソスソスワゑソスソスjソスB

RangeソスIソスuソスWソスFソスNソスg.Replace(What, Replacement, [LookAt])

ソスソスソスソスWhatソスノは鯉ソスソスソスソスソスソスソスソスソスAReplacementソスノは置ソスソスソスソスソスソスソスソスALookAtソスノは鯉ソスソスソスソスソスソス@ソスニゑソスソスト奇ソスソスSソスソスvソスixlWholeソスj/ソスソスソスソスソスソスvソスixlPartソスjソスソスソスwソス閧オソスワゑソスソスB

ソスソスソスフサソスソスソスvソスソスソスヘ、InputBoxソスソスソス\ソスbソスhソスナ指ソス閧ウソス黷スソスZソスソスソスヘ囲難ソスソスフセソスソスソスソスソスフ会ソスソスsソスソスソス鼕ソスナ削除ソスソスソスワゑソスソスB

ソスソスソスTソスソスソスvソスソスソスソス

Sub Sample()
    Dim rngTarget As Range
    
    On Error Resume Next
    Set rngTarget = Application.InputBox( _
              "ソスヘ囲ゑソスIソスソスソスソスソストゑソスソスソスソスソスソスソス", Type:=8)
    On Error GoTo 0
    
    If rngTarget Is Nothing Then Exit Sub
        
    rngTarget.Replace vbLf, "", xlPart
End Sub