+ Reply to Thread
Results 1 to 22 of 22

Retrieving value of a corresponding cell in same row

  1. #1
    Registered User
    Join Date
    08-06-2014
    Location
    Sydney, Australia
    MS-Off Ver
    2007
    Posts
    11

    Retrieving value of a corresponding cell in same row

    Hi all,

    I am currently struggling with a spreadsheet that has been created in Excel 2007. Essentially, it has a number of items (individually identified by “S code” in the first column) that need to be tested at the specific dates over a one year period (i.e. at “2 weeks”, “4 weeks”, “8 weeks”, etc) as shown in the screenshot below.

    A user manually enters “Complete” into the corresponding cell in the “In-testing status” section of the spreadsheet when testing has been completed for a certain item at a particular time point.


    Screenshot.jpg


    I already have set up conditional formatting that highlights cells with dates older than the current date red. What I need to do now is to check for a particular item and date whether or not the corresponding “In-testing Status” cell reads “COMPLETE”. If it does, I need to use a conditional formatting rule to return formatting to normal.

    What I am unsure of is how exactly to retrieve the value of the corresponding “In-testing Status” cell.

    Unfortunately I can’t use a macro-enabled workbook in this environment so was wondering if anyone has any suggestions as to how to approach this without VBA? Please let me know if there is any additional information I can provide to clarify my question.

    Any help or advice would be very much appreciated.

  2. #2
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Retrieving value of a corresponding cell in same row

    Hi,

    Welcome to the Forum.

    You can use INDEX & MATCH functions to retrieve a cell value based on the row & column. Please post a sample template of your workbook in excel format using "Go Advanced" option.

  3. #3
    Registered User
    Join Date
    08-06-2014
    Location
    Sydney, Australia
    MS-Off Ver
    2007
    Posts
    11

    Re: Retrieving value of a corresponding cell in same row

    Thank you very much for your reply. I did consider the index and match approach, but wasn’t sure how to look up the corresponding column in the “In-testing Status” section in the context of a conditional formatting rule for the whole worksheet.

    For example, for the first item (S code S25252002), the 13 weeks testing date is 3/10/2013. I would like to look up the data in the corresponding 13 weeks cell in the “In-testing Status” array (i.e. M7 in the attached spreadsheet). But I’d like the rule to be able to check all testing dates for any item against their corresponding “In-testing Status” cells.

    Example.xlsx

  4. #4
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Retrieving value of a corresponding cell in same row

    Hi,

    Please see the attached file. I have added a new sheet and updated the formula in that.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-06-2014
    Location
    Sydney, Australia
    MS-Off Ver
    2007
    Posts
    11

    Re: Retrieving value of a corresponding cell in same row

    Thanks again cbatrody for the quick response. I understand the formula you've included and can see how it would work with the fixed S code and testing week values in Sheet 2, but am still not entirely sure how I would go about adapting it into a formula for a conditional formatting rule that I could apply to all of the testing dates for all items in Sheet 1? For example, if the 13 weeks "In-testing Status" for any of the items was "INCOMPLETE", I would like to change the background colour of all of the corresponding 13 weeks testing dates for those items.

    My apologies if I am being unclear, please let me know if I can clarify this any further.

  6. #6
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Retrieving value of a corresponding cell in same row

    Something like this? Please see the attached file.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    08-06-2014
    Location
    Sydney, Australia
    MS-Off Ver
    2007
    Posts
    11

    Re: Retrieving value of a corresponding cell in same row

    Apologies for the slow response. Yes, that is exactly the sort of conditional formatting that I would like to implement. If you have any thoughts on the syntax of the rule I'd be very appreciative.

  8. #8
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Retrieving value of a corresponding cell in same row

    In cell C7 (Sheet1) in the conditional formatting window, please type the following formula after choosing "Use a formula to determine which cell to format".


    =K7="INCOMPLETE"

    Then copy the cell using "Format Painter" and format the complete range of dates.
    Attached Images Attached Images

  9. #9
    Registered User
    Join Date
    08-06-2014
    Location
    Sydney, Australia
    MS-Off Ver
    2007
    Posts
    11

    Re: Retrieving value of a corresponding cell in same row

    Thanks a lot for your reply again. What you have suggested works really well as a stand alone rule, but now I'm struggling to combine it with a pre-existing rule I had. Essentially what I want to do is highlight testing dates that have already passed (i.e. are less than the current date which I have in a fixed cell) and that have a corresponding "In-testing Status" of "INCOMPLETE". I know there must be a way to combine both in one conditional formatting rule, but for the life of me haven't been able to find a way to do it.

    You've been really helpful cbatrody, I really appreciate it. My apologies for being dense!

  10. #10
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Retrieving value of a corresponding cell in same row

    Hi,

    No worries, please see the updated file. I have changed the conditional format as following-

    =AND(C7<TODAY(),K7="INCOMPLETE")
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    08-06-2014
    Location
    Sydney, Australia
    MS-Off Ver
    2007
    Posts
    11

    Re: Retrieving value of a corresponding cell in same row

    I have no idea why this is working in the example spreadsheet but not my own original... While I had C7 selected I went into the Conditional Formatting window and entered in the formula =AND(C7<TODAY(),K7="INCOMPLETE") to highlight relevant cells red as a rule as you suggested, and afterwards used the Format Painter tool to copy the formatting of C7 across the rest of the range. It still doesn't seem to be highlighting dates older than the current date red, however. I'm not at all sure what it is that I'm doing wrong in the original spreadsheet.

  12. #12
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Retrieving value of a corresponding cell in same row

    Hi,

    It should ideally! Please post that file if you want me to have a look at it.

  13. #13
    Registered User
    Join Date
    08-06-2014
    Location
    Sydney, Australia
    MS-Off Ver
    2007
    Posts
    11

    Re: Retrieving value of a corresponding cell in same row

    Apologies again for the slow response. Here is a slightly modified version of the original spreadsheet.

    Online Example.xlsx

  14. #14
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Retrieving value of a corresponding cell in same row

    Hi,

    I have modified the conditional formatting in the attached file. Please see if the color coding meets the desired output.
    Attached Files Attached Files

  15. #15
    Registered User
    Join Date
    08-06-2014
    Location
    Sydney, Australia
    MS-Off Ver
    2007
    Posts
    11

    Re: Retrieving value of a corresponding cell in same row

    Thanks again, but for some reason, in the last two rows the 2 weeks testing dates are not highlighted even though the dates have passed and the status is "INCOMPLETE"?

  16. #16
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Retrieving value of a corresponding cell in same row

    Please see the attached file.
    Attached Files Attached Files

  17. #17
    Registered User
    Join Date
    08-06-2014
    Location
    Sydney, Australia
    MS-Off Ver
    2007
    Posts
    11

    Re: Retrieving value of a corresponding cell in same row

    Thanks again for your assistance and patience, but unfortunately incorrect cells are still being highlighted. Who would've thought such a simple concept could get so complicated!

    Basically, a cell should be highlighted red if its date is older than the current date and its corresponding "In-testing Status" is "INCOMPLETE". So if there is a cell with the date "6/08/2014" and its corresponding "In-testing Status" is selected as "INCOMPLETE", then it should be highlighted red.

    For some reason in the most recent versions of the spreadsheet that you've posted, some such cells are not highlighted red, while others with dates that haven't occurred yet are highlighted red. I can't quite figure out why this would be the case and would very much appreciate any further input you can offer.

  18. #18
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Retrieving value of a corresponding cell in same row

    Please check the attached file.
    Attached Files Attached Files

  19. #19
    Registered User
    Join Date
    08-06-2014
    Location
    Sydney, Australia
    MS-Off Ver
    2007
    Posts
    11

    Re: Retrieving value of a corresponding cell in same row

    Brilliant, that works perfectly now. What was it that you changed in the last version?

    My next question would then be: Is there a way I can count the number of highlighted cells using a countif() function?

    Thanks so much for helping me out!

  20. #20
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Retrieving value of a corresponding cell in same row

    I reapplied the conditional formatting clearing the previous ones & it worked

    No, you can't count the highlighted cells using "COUNTIF" function, you would need a macro for that.

  21. #21
    Registered User
    Join Date
    08-06-2014
    Location
    Sydney, Australia
    MS-Off Ver
    2007
    Posts
    11

    Re: Retrieving value of a corresponding cell in same row

    No worries, thank you very much! I'm very glad to finally see it sorted.

  22. #22
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Retrieving value of a corresponding cell in same row

    You are welcome

    If that takes care of your question, please mark this thread as Solved by selecting Thread Tools --> Mark thread as solved.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Retrieving cell value for VBA formula
    By The Phil in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-26-2013, 05:52 PM
  2. Retrieving portion of cell value
    By hk106 in forum Excel General
    Replies: 15
    Last Post: 12-22-2011, 10:15 AM
  3. Retrieving data from a cell
    By CobraLAD in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-24-2009, 04:31 AM
  4. Retrieving a Name of Cell
    By cheesey_toastie in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-27-2006, 06:10 AM
  5. Cell searching and retrieving
    By fluci in forum Excel General
    Replies: 5
    Last Post: 08-04-2005, 10:37 AM

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