ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   testing data in above cell, and choosing column to copy from (https://www.excelbanter.com/excel-programming/390433-testing-data-above-cell-choosing-column-copy.html)

OTWarrior via OfficeKB.com

testing data in above cell, and choosing column to copy from
 
i have a cell which wil set a value (5, 10, ETC). and depending on this value,
chnage the boxes below it.
i currenlty have:

=IF(B8=G8,G9,0)

which changes the cell is one criteria is met. however i want

=IF(B8=G8,G9,0) or IF(B8=j8,j9,0) or IF(B8=h8,h9,0)

can this be done in a cell? and if so, what is the syntax for separateing the
exprressions ("IF(B8=j8,j9,0)")?

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200705/1


OTWarrior via OfficeKB.com

testing data in above cell, and choosing column to copy from
 
i figured it out myself, and it is

=IF(B8=G8,G9,IF(B8=H8,H9,IF(B8=I8,I9,IF(B8=J8,J9,0 ))))

to make it easier to view it is
=IF(B8=G8,G9, IF(B8=H8,H9, IF(B8=I8,I9, IF(B8=J8,J9,
0))))

OTWarrior wrote:
i have a cell which wil set a value (5, 10, ETC). and depending on this value,
chnage the boxes below it.
i currenlty have:

=IF(B8=G8,G9,0)

which changes the cell is one criteria is met. however i want

=IF(B8=G8,G9,0) or IF(B8=j8,j9,0) or IF(B8=h8,h9,0)

can this be done in a cell? and if so, what is the syntax for separateing the
exprressions ("IF(B8=j8,j9,0)")?


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200705/1



All times are GMT +1. The time now is 12:04 PM.

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