Quantcast
Channel: OKWAVE 最新質問(Visual Basic/257)【本日】
Viewing all articles
Browse latest Browse all 7264

重複した値を一つ残す VBA

$
0
0
重複した値を一つだけ残していきたいです。 たとえば リンゴ リンゴ リンゴ とあれば2つリンゴが消えて欲しいです 今のところ重複した値を消す方法しかわからず詰まっています。 なにとぞよろしくおねがいします  Option Explicit Sub test() Dim i As Double Dim x As Double Application.Calculation = xlCalculationManual Application.ScreenUpdating = False Range("T3", Range("T" & Rows.Count).End(xlUp)).Sort Key1:=Range("T3"), Order1:=xlAscending, Header:=xlYes For i = 3 To Cells(Rows.Count, 20).End(xlUp).Row Range(Cells(i, "T"), Cells(i, "T")).RemoveDuplicates Columns:=Array(1), Header:=xlYes Application.Calculate Next End Sub

Viewing all articles
Browse latest Browse all 7264

Trending Articles