LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default macro editting

Hi
Experts
I m working on excel sheet. I have used column A to W. Some of the column
have VB script and conditional formatting in it. After some of the operations
are performed column F has "C" in it. ( which is entered manually)

What I am after?
As soon as column F has "C" in it , I want the entire information for that
row from columnA to column W ( or if in future column number exceeds) get
cut and paste over to next available blank row on sheet 3. The blank row
on sheet 1 should get filled automatically.

What I tried ( while recording macro)
If column F has "C" in it.
I recorded a macro to select the particular row from column A to W
cut that selected row
make sheet 3 active
find next available blank row on active sheet
Paste the entire row from column A to W
make sheet 1 active
blank row to get moved up automatically( I didn't try this)
select save

The recorded macro works fine. But somebody has to press either button to
do this or any short-cut key If I select while defining macro. This is time
consuming in production environment.

What I am after?
I am trying to write the VB script to get this done aumatically as soon as
somebody puts "C" in column F. I tried this way

If (Target.Column = 6) Then [A=1, B=2, C=3, .... F=6, ...... Z=26]
If Target.Value = "C" Then
Range("$A$4:$W$4").Select [check rhis]
Selection.Cut
Sheets("sheet3").Select
Range("$A$4:$W$4").Select [check this, I tried Range("A65536").

End(xlUp)(2).Select
ActiveSheet.Paste
Sheets("sheet1").Select

<<<<< <<<<<< ( fill up the blank row automatically)( don't know code)
ActiveWorkbook.Save
End If
End If


Somebody who can go through this code and amend this to get it working. I
will be really very thankful.
Thanking in anticipation.





 
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
I need help with a table formula/mass editting urlocaljeweler New Users to Excel 2 November 18th 09 07:29 PM
editting a template kaja New Users to Excel 2 June 6th 08 10:29 PM
Hexidecimal Editting Andibevan[_2_] Excel Programming 7 July 12th 05 11:55 AM
Possible to see which user is editting/using file? McManCSU[_8_] Excel Programming 0 June 28th 05 02:23 PM
Editting Formulas Using a Macro Chuck H. Excel Programming 1 July 19th 04 09:29 PM


All times are GMT +1. The time now is 04:22 AM.

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

About Us

"It's about Microsoft Excel"