LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Inserting row based on critéria using VBA


RSantos Wrote:
HI,

I would like to insert a row when a certain cell has a certain value.
The ideia is to divide the values into weeks, inserting an empty row
after every sunday (where I wiil put the totals of the week), and group
the whole week in order to see just the week total.

Can anyone help me doing this in VBA?


Sub ValSunday()
'
Range("A9").Select

If Selection.Value = "Sunday" Then
'your code here
End If

End Sub




copy and paste this in a normal module,
create a button and assin this macro to it:
once you work on the code and add other code that meets your specs,
you can then paste it into your worksheet change event but thats
another story
work on the macro first


--
davesexcel
------------------------------------------------------------------------
davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708
View this thread: http://www.excelforum.com/showthread...hreadid=516687

 
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
Query criteria based on a changing criteria list bwilk77 Excel Discussion (Misc queries) 2 May 27th 09 04:03 PM
Vlookup with 2 different criteria before inserting a value Eqa Excel Discussion (Misc queries) 15 November 29th 07 04:44 PM
inserting a row based on a condition. Gary Excel Worksheet Functions 3 August 18th 06 02:09 PM
Inserting a worksheet based on a template Ron de Bruin Excel Programming 2 May 11th 04 12:11 AM
Inserting rows based on count Mike[_77_] Excel Programming 6 April 20th 04 11:14 PM


All times are GMT +1. The time now is 03:03 PM.

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"