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: 148
Default How to combine lines of code?

I currently have multiple situations where code resembles the following:

Range("a" & numberrows + 1).Select
Range("a" & numberrows + 1).Formula =
"=date(YEAR(begrevdate)+1,month(begrevdate),day(be grevdate))"
Selection.NumberFormat = "m/d/yyyy"

In order to reduce the size and complexity, I would like to be able to
condense some of the coding to resemble something like:

Range("a" & numberrows + 1).Formula =
"=date(YEAR(begrevdate)+1,month(begrevdate),day(be grevdate))"; NumberFormat =
"m/d/yyyy"

I thought this was possible but my attempts to play with syntax have been
unsuccessful in getting it to work.

Any help would be much appreciated.
TIA


 
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
Combine and fill Names & Addresses in 2 lines? clubchamp04 Excel Discussion (Misc queries) 2 March 13th 08 12:59 AM
Combine stacked column and line chart w/series lines ancillaries Charts and Charting in Excel 1 April 7th 06 11:51 PM
"how to combine multiple lines into a pull down option?" eric_mc2 Excel Worksheet Functions 1 July 4th 05 03:06 AM
Want to combine columns and horizontal lines in complex chart - Can it be Done?! James Hobart Charts and Charting in Excel 3 February 18th 05 02:23 AM
Combine Code Steph[_3_] Excel Programming 2 January 23rd 04 08:19 PM


All times are GMT +1. The time now is 08:31 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"