IF Function

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

in the IF function is there anyway that i can have the 'if true' section of
the formula copy the values in another workbook in specific rows. In other
words,

=IF(ISNA(MATCH($A5,[SDS.xls]NOW!$L$3,0)), IF TRUE then
copy cells n8:n12 and n14:n15 in workbook SDS to cell b5:g5 in workbook wkly
mgt?

Brigida
 
no. sorry.
formulas return a value, they cannot perform an action
like copy.
it may be possible to use a macro to do that but without
seeing your data and knowing more about, i can only guess.
 
Posted this reply to you in the original thread about 5 hours ago:
---------
outlook help said:
=IF(ISNA(MATCH($A5,[SDS.xls]NOW!$L$3,0)), IF TRUE then, IF FAlSE then)
then if true, copy cells n8:n12 and n14:n15 in workbook SDS to cell b5:g5 in
workbook wkly mgt?

If I've read your intent correctly,

Assuming the action if FALSE is to return blanks: ""
and the output range is instead B5:H5
(think there's a typo in your "B5:G5")

In book: wkly mgt
-----------
Put in B5:

=IF($A5<>[SDS.xls]NOW!$L$3,INDIRECT("[SDS.xls]NOW!N"&COLUMNS($A$1:A1)+7),"")

Copy B5 across to F5

The above will return cells n8:n12 in book: SDS into B5:F5, if TRUE

Put in G5

=IF($A5<>[SDS.xls]NOW!$L$3,INDIRECT("[SDS.xls]NOW!N"&COLUMNS($A$1:A1)+13),""
)

Copy G5 across to H5

The above will return cells n14:n15 in book: SDS into G5:H5, if TRUE

--

There's no need to use: MATCH($A5,[SDS.xls]NOW!$L$3,0)
if you're checking the match of a cell against another single cell range

Note that INDIRECT requires the "slave" book, SDS.xls to be open, otherwise
you'll get #REF! errors
 
Back
Top