#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default SUB ROUTINE

I have a worksheet with 4 columns.
Column A Row 1 is for inputing a date, formatted mm/dd/yy
Column B Row 1 is empty, formatted accounting, 2 decimals
and no currency
Column C Row 1 has a formula, formatted accounting, 2
decimals and no currency =IF(INDIRECT(ADDRESS(ROW()-9,5))
0,(Lenders_Half_Daily_Dep),Total_Monthly_Pymt)


Column D Row 1 has a formula, =IF(INDIRECT(ADDRESS(ROW
(),3))="","",SUM(INDIRECT(ADDRESS(ROW()-1,4))+INDIRECT
(ADDRESS(ROW(),2)))-INDIRECT(ADDRESS(ROW(),3)))

This is what I want to do in a sub routine from active
cell:
Insert a row
Place a formula on inserted row B2 (=C2) and protect cell
B2
Unlock cell C2
Copy formula from D1

Could someone help
Unlock C
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default SUB ROUTINE

the sheet must be unprotected:

Range("C2").Locked = False

--
Regards,
Tom Ogilvy


tokirk wrote in message
...
I have a worksheet with 4 columns.
Column A Row 1 is for inputing a date, formatted mm/dd/yy
Column B Row 1 is empty, formatted accounting, 2 decimals
and no currency
Column C Row 1 has a formula, formatted accounting, 2
decimals and no currency =IF(INDIRECT(ADDRESS(ROW()-9,5))
0,(Lenders_Half_Daily_Dep),Total_Monthly_Pymt)


Column D Row 1 has a formula, =IF(INDIRECT(ADDRESS(ROW
(),3))="","",SUM(INDIRECT(ADDRESS(ROW()-1,4))+INDIRECT
(ADDRESS(ROW(),2)))-INDIRECT(ADDRESS(ROW(),3)))

This is what I want to do in a sub routine from active
cell:
Insert a row
Place a formula on inserted row B2 (=C2) and protect cell
B2
Unlock cell C2
Copy formula from D1

Could someone help
Unlock C



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
sub routine Gord Dibben Excel Discussion (Misc queries) 0 November 13th 09 12:15 AM
Sort Routine Platinum girl[_2_] Excel Discussion (Misc queries) 0 March 9th 07 03:21 PM
simplifying routine KneeDown2Up New Users to Excel 5 January 4th 07 05:28 PM
Routine?? Zax Excel Programming 3 December 19th 03 05:50 PM
Need VBA Routine John M. Lembo Excel Programming 0 July 13th 03 01:51 AM


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