+ Reply to Thread
Results 1 to 5 of 5

Formula - Copy data to remote cell

  1. #1
    Registered User
    Join Date
    08-15-2008
    Location
    SLC
    Posts
    7

    Formula - Copy data to remote cell

    Hello,

    Is it possible to have part of a formula in one cell that if the condition is true that it can take the value from a second cell and copy that into a third cell.



    Say, Cell B2 has the formula, and if the condition is true it takes the value from Cell B1 and copies that into Cell D2.


    =IF(B2>A2,D2=B1,"") IF B2>A2 then D2=B1 Else do nothing.

    Thanks for your assistance.

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi,

    All you need is this in D2

    =IF(B2>A2,B1,"")
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Registered User
    Join Date
    08-15-2008
    Location
    SLC
    Posts
    7
    Ooops. Sorry my mistake in the explanation.


    I don't think D2 can have the formula because it would need a nested IF that has 20 IF's and I think that exceeds the limit.

    I have a row of 20 cells that contain different values (D5:W5)
    Cells D6:W6 each have formulas that do something, but I would ALSO like it when the first one is true I want the value from the cell above it on Row 5 to go to cell Y5.


    --A---B---C---D---E---F---G---H---I---J---. . . . . .---Y
    1
    2
    3
    4
    5---------------1---2---3---4----------------------------1
    6---------------T

    ------------^True^

    If D6 = True then Y5 = D5 and End because this was the first occurance
    Else If E6 = True then Y5 = E5 and End because this was the first occurance
    Else If F6 = True then Y5 = F5 and End because this was the first occurance


    So. If E6 is True AND G6 is true, I only want the value from E5 to go to Y5 because E6 was the first cell in Row 6 to be true.

    If F6, H6, M6, R6 are each True, I only want the value from F5 to go to Y5 because F6 was the first cell in Row 6 to be true.


    I hope that makes sense, and I hope there is a solution.

    Thank you.

  4. #4
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885
    Hi smell_fire,

    Perhaps this formula, in cell Y5, will work for you:

    =INDEX(D5:W5,MATCH(TRUE,D6:W6,0))

    This assumes the TRUE value you're seeking is a logical TRUE cell value. If it's simply text, e.g. "TRUE", then be sure to enclose TRUE in quotes within the formula like so:

    =INDEX(D5:W5,MATCH("TRUE",D6:W6,0))

  5. #5
    Registered User
    Join Date
    08-15-2008
    Location
    SLC
    Posts
    7
    Thanks for your help.

    And sorry for the long time that has gone by.


    Your suggestion works indeed!

    =INDEX($D$5:$W$5,MATCH($E$1,D12:W12,0))



    Do you have any idea why these two matches don't work though.

    =INDEX($D$5:$W$5,MATCH($E$1,D8:W8,0),MATCH($H$1,D8:W8,0))



    Thanks so much for the help that we all get from you folks that know so much!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1