ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   IF Function (https://www.excelbanter.com/new-users-excel/9812-if-function.html)

outlook help

IF Function
 
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.

-----Original Message-----
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
.


Max

Posted this reply to you in the original thread about 5 hours ago:
---------
outlook help wrote
....
=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

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----




All times are GMT +1. The time now is 12:03 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com