Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Excel - How do I populate a cell depending on the value in another cell

  • 05-04-2007 2:54pm
    #1
    Registered Users, Registered Users 2 Posts: 1,377 ✭✭✭


    Excel – How do I populate a cell depending on the value in another cell


    Wondering if someone can help me with this.

    In a worksheet I want to populate the value in a cell depending on the values in other cells on other worksheets.

    Something like

    IF (Worksheet_1 Cell_A OR Woorksheet_2 Cell_A OR Worksheet_n Cell A) = ‘1’ THEN ‘X’

    I’m sure it’s fairly easy, just can’t get my head around it on a sunny Thursday evening


Comments

  • Closed Accounts Posts: 2,025 ✭✭✭zod


    maybe lookup


  • Registered Users, Registered Users 2 Posts: 3,311 ✭✭✭xebec


    Also check the syntax of your IF statements.

    =IF(Worksheet_1_Cell_A = "1","X","Something else")

    You can embed IF statements, so for example if the above weren't true, then in the "Something else" bit you could put another IF to check Worksheet 2 and so on.

    Not sure how you would reference cells in different worksheets, ignore that bit of my example because it's there just to illustrate the point.


  • Registered Users, Registered Users 2 Posts: 4,787 ✭✭✭prospect


    I would suggest a vlookup or hlookup function is your answer.


  • Registered Users, Registered Users 2 Posts: 23,212 ✭✭✭✭Tom Dunne


    If statement is your only man for this job.

    xebec gives the correct format of the if statement. To reference a cell on another sheet, you use the format <sheetname>!<cell reference>, so the if statement becomes:

    = =IF(Sheet2!C4 = "1","X","Something else")

    obviously replacing Sheet2 and C4 with the relevant values.

    To back up what xebec says about multiple if statements, you could end up with something wonderful like

    =IF(sheet1!A1 = "1","X", IF(Sheet1!A2 = "1","X",IF(Sheet2!C4 = "1","X","Something else"))))

    and so on. Fun.


Advertisement