Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 76
Default move cells that meet a certain criteria to the row below

I want my macro to do the following: If Column E2="COA" I want it to move
COA to E3.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default move cells that meet a certain criteria to the row below

There are a few choices.

If you mean the equivalent of Cut|paste:

Option Explicit
Sub testme()
With ActiveSheet
If LCase(.Range("e2").Value) = LCase("COA") Then
.Range("e2").Cut _
Destination:=.Range("E3")
End If
End With
End Sub

If you mean just reassign the value, you coul use:

Option Explicit
Sub testme2()
With ActiveSheet
If LCase(.Range("e2").Value) = LCase("COA") Then
.Range("E3").value = .range("E2").value
.range("e2").value = ""
End If
End With
End Sub

Donna wrote:

I want my macro to do the following: If Column E2="COA" I want it to move
COA to E3.


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
count cells that meet 2 criteria aimee Excel Worksheet Functions 3 June 18th 08 06:45 PM
need to move data to certain column if they meet criteria klafert Excel Worksheet Functions 0 May 17th 08 12:41 AM
Count Cells that meet Criteria kmason Excel Worksheet Functions 6 August 24th 06 04:31 PM
Can I sum #s in a cell if other cells meet a certain criteria? jacchops Excel Discussion (Misc queries) 2 June 16th 06 09:42 PM
Sum Total # Of Cells That Meet Several Criteria ashstudly Excel Worksheet Functions 4 January 23rd 06 05:55 AM


All times are GMT +1. The time now is 10:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"