I am also working with a DDE and have questions on updating my data
tables. I hope you both don't mind my participation in this thread.
My Dilemma: IF PRICE > HIGH, THEN capture the new HIGH value, ELSE
show current HIGH value.
Solution 1: Uncertain how to approach this problem, I attempted to go
with something familiar: =IF(PRICE > HIGH, PRICE, HIGH).
Unfortunately, I discovered this does not record the new price. It
only confirms the condition that a new HIGH has been reached during the
current period.
Solution 2: Create a macro to paste PRICE values to HIGH.
While this solution does record the change in values, I have not been
able to automate the macro.
Sub Macro1()
'COPY PRICE
Range("PRICE").Select
Selection.Copy
'PASTE VALUES TO HIGH
Range("HIGH").Select
*Selection.PasteSpecial Paste:=xlValues*, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=False
ActiveSheet.Paste
Application.CutCopyMode = False
End Sub
My questions are,
1) Is it possible to create a function using the
*Selection.PasteSpecial Paste:=xlValues * vba command?
2) Can vba and macro commands be written into a conditional format or
into a Logical Function formula? Into other types of Excel Functions?
3) In your opinion, what is the most effective method for automating
the paste values vba command?
4) What skill sets should I review before creating this next solution?
By the way, I have access to Jeff Webb's "Using Excel Visual Basic for
Applications," "Excel Bible 2003," and "MOS 2003 Study Guide," not to
mention access to study sections at sites like ExcelTip, so review and
learning shouldn't be much of a problem.
Thanks.