Problem updating nested IF statement results

G

Guest

I'm using the following formula to give a value to several items of data
that I want to link into a Visualbasic program:

=IF((AND($U$1=Y2,Z2="D")),1,0), where $U$1 is the copy of a date in U2 (set
up as a relative link to another spreadsheet.

However, when I run a macro to copy the date in U2
(as either values or values and number formats) into U1 the formula does not
update in the row where the condition is met.

Why does it not update and how can I solve this problem?

Many thanks
 
B

Bob Phillips

I just knocked up some simple simulation code, and it worked for me.

Where is the formula (which cell)? Show the copy code.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
G

Guest

Bob,

Many thanks - the copy code is:

Selection.Copy
Range("U1").Select
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False

The formula is in cell: AG20. AC20 has the value 08/09/2007 and AE20 has
the value "E"

Best wishes,

Tony
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top