Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Reinstate formulas in specific cells

Ive made great use of this form to solve my Excel problems, but this not
alludes me; Need your expertise!

I have cells that originally contained formulas, but the 'user' has the
option to input raw data into those cells. I need a way to reinstate those
formulas into a range of cells on a row-by-row basis.

The original cells with formulas are contained in range: R11:V74

In cell R4 I have a cell where the €˜user can select the ROW where they want
the formulas reinstated.

In cells R3:V3 I have the formulas ready to be copied and pasted into
appropriate cells on the selected ROW.

Additionally,
I need a solution that can be applied to other worksheets within the workbook.

If the ROW selected is outside the first row (row 11), or outside the last
row (74) it does nothing and returns the cursor to the row selection box in
cell R4. However, the user can add / delete rows so the solution needs to
determine where the last row of data is located. The starting row of data
will always be 11.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Reinstate formulas in specific cells

on the sheet's code page (right click the tab and select View Code from the
popup menu)

Option Explicit
Private Sub Worksheet_Change(ByVal target As Range)
If target.Address = Range("R4").Address Then resetrow (target.Value)
End Sub
Sub resetrow(Rw As Long)
If Rw < 11 Or Rw Range("R11").End(xlDown).Row Then Exit Sub
Range("R3:V3").Copy
Cells(Rw, "R").PasteSpecial xlAll
Application.CutCopyMode = False
End Sub



"usmc-r70" wrote in message
...
Ive made great use of this form to solve my Excel problems, but this not
alludes me; Need your expertise!

I have cells that originally contained formulas, but the 'user' has the
option to input raw data into those cells. I need a way to reinstate
those
formulas into a range of cells on a row-by-row basis.

The original cells with formulas are contained in range: R11:V74

In cell R4 I have a cell where the €˜user can select the ROW where they
want
the formulas reinstated.

In cells R3:V3 I have the formulas ready to be copied and pasted into
appropriate cells on the selected ROW.

Additionally,
I need a solution that can be applied to other worksheets within the
workbook.

If the ROW selected is outside the first row (row 11), or outside the last
row (74) it does nothing and returns the cursor to the row selection box
in
cell R4. However, the user can add / delete rows so the solution needs to
determine where the last row of data is located. The starting row of data
will always be 11.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Reinstate formulas in specific cells

This being my first 'thread' submission I am unfamiliar with the processes
and what buttons to push.

Patrick, I inadvertently pushed €˜NO on the €˜Did this post answer the
question? before I considered the options, please accept my apology.

After re-typing, re-reading and re-pasting the code I am still not able to
effect the €˜copy €“ paste functionality.

Is the intent for code to execute once the €˜User enters a row number in
cell R4 and selects €˜ENTER?

When I €˜Right Clicked on the €˜Sheet Name, and selected €˜View Code the
default €˜Sheet 3 window opened up with €˜Module 1 in the background. I
tried the code in both windows, with no action from the code that I could
observe.

After some additional though on my problem, I only need one cell, R3, from
the previous R3:V3 range to be copied and pasted into column R of the
selected row.

Any suggestions?



"Patrick Molloy" wrote:

on the sheet's code page (right click the tab and select View Code from the
popup menu)

Option Explicit
Private Sub Worksheet_Change(ByVal target As Range)
If target.Address = Range("R4").Address Then resetrow (target.Value)
End Sub
Sub resetrow(Rw As Long)
If Rw < 11 Or Rw Range("R11").End(xlDown).Row Then Exit Sub
Range("R3:V3").Copy
Cells(Rw, "R").PasteSpecial xlAll
Application.CutCopyMode = False
End Sub



"usmc-r70" wrote in message
...
Ive made great use of this form to solve my Excel problems, but this not
alludes me; Need your expertise!

I have cells that originally contained formulas, but the 'user' has the
option to input raw data into those cells. I need a way to reinstate
those
formulas into a range of cells on a row-by-row basis.

The original cells with formulas are contained in range: R11:V74

In cell R4 I have a cell where the €˜user can select the ROW where they
want
the formulas reinstated.

In cells R3:V3 I have the formulas ready to be copied and pasted into
appropriate cells on the selected ROW.

Additionally,
I need a solution that can be applied to other worksheets within the
workbook.

If the ROW selected is outside the first row (row 11), or outside the last
row (74) it does nothing and returns the cursor to the row selection box
in
cell R4. However, the user can add / delete rows so the solution needs to
determine where the last row of data is located. The starting row of data
will always be 11.


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
reinstate smart tag Phippsy Excel Discussion (Misc queries) 0 May 18th 09 10:33 AM
Help with locking a file after 365 day the a code to reinstate it... [email protected] Excel Programming 3 October 11th 07 12:21 PM
Is there a way to eliminate specific cells from formulas? Valerian New Users to Excel 9 April 3rd 06 10:01 PM
how do i reinstate my excel menu bar? marvins ear Setting up and Configuration of Excel 2 April 27th 05 12:58 AM
How do I protect specific cells (like labels and formulas) on a w. Evelyne Excel Discussion (Misc queries) 2 April 1st 05 02:35 AM


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