Solved

Small Macro to move data over

Posted on 2015-02-18
5
45 Views
Last Modified: 2015-02-21
EE Pros,

I have two Worksheets where I enter a number in WS1 (say A4), and I need it to place the entered number in a cell (say B4) in WS2 then stop.  

The reason for the macro instead of a formula is that once I move to WS2, I want the ability to put in a new number (different then what is on WS1) to get a graphic to change.  I have it all working except for this number passing.

What would be the simple Macro (Private....) and I'm assuming it would be put into the WS1 Module to look for a change in that particular cell.

I hope that makes sense.

B.
0
Comment
Question by:Bright01
  • 2
  • 2
5 Comments
 
LVL 29

Accepted Solution

by:
gowflow earned 400 total points
ID: 40616608
Put this in the worksheet change event of sheet1

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A4")) Is Nothing Then
    Sheets("Sheet2").Range("B4") = Target.Value
End If
End Sub

Open in new window


gowflow
0
 
LVL 31

Assisted Solution

by:Rob Henson
Rob Henson earned 100 total points
ID: 40618592
Downside to using a Macro is that you lose the Undo history.

How about having an alternative input cell on WS2, eg A1, and then a formula in B4:

=IF(A1="",Sheet1!A4,A1)

The user can then enter or delete the Alternative Input value as required.

Thanks
Rob h
0
 

Author Comment

by:Bright01
ID: 40618807
Rob,  Interesting approach....let me give it a try.  

Gowflow's approach also works well.

Back shortly.

B.
0
 
LVL 29

Expert Comment

by:gowflow
ID: 40621046
For sure this is pretty basic it all depends how you apply it then maybe there are other ways for sure. But the way you asked for it we delivered it point blank.

gowflow
0
 

Author Closing Comment

by:Bright01
ID: 40623704
Thanks guys and sorry for the delay.... I went with Gowflow's macro solution although I do appreciate Rob's solution as well.  The beauty of Gowflow's solution is that the user doesn't see the formula and Excel looks more like a real app.

Sorry for the delay...


B.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

What is a Form List Box? (skip if you know this) The forms List Box is the alternative to the ActiveX list box. If you are using excel 2007, you first make sure you have a developer tab (click the Orb)->"Excel Options"->Popular->"Show Developer tab…
Sparklines have been introduced with Excel 2010 and are a useful tool for creating small in-cell charts, used for example in dashboards. Excel 2010 offers three different types of Sparklines: Line, Column and Win/Loss. What it does not offer is a…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now