+ Reply to Thread
Results 1 to 28 of 28

Looking for a cell with # with a date range then looking up to the date

  1. #1
    Forum Contributor
    Join Date
    01-21-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    116

    Looking for a cell with # with a date range then looking up to the date

    Hi

    I have a problem that I would your help with. I have attached a spreadsheet.

    I need a formulae in sheet 2 that looks at sheet 1. Within a defined date range. That looks at any cell with a #AAA (AAA being an employee initials) It needs to find the last # in that defined date range then look up to the date. The date is what I need to be presented.

    Hopefully the attached sheet will show what is needed.

    Help.xlsx

    Thank you,

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Looking for a cell with # with a date range then looking up to the date

    Try this Array Formula which requires confirmation with Ctrl+Shift+Enter instead of Enter alone.

    In E5
    Please Login or Register  to view this content.
    and copy down.


    ******************************

    Remember an Array Formula is confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Forum Contributor
    Join Date
    01-21-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    116

    Re: Looking for a cell with # with a date range then looking up to the date

    Thank you Sktneer however this works for a fixed period I need it look up between the defined range C2 - C3. In fact coming to thing about it I do need to 'from' date just the 'to' date C3. So what is the last # up to the date in c3.

    Thank you for what you have done thus far

  4. #4
    Valued Forum Contributor
    Join Date
    05-20-2013
    Location
    Ohio, USA
    MS-Off Ver
    Excel 2013
    Posts
    941

    Re: Looking for a cell with # with a date range then looking up to the date

    In E5
    Please Login or Register  to view this content.
    Ctrl+Shift+Enter

    Copy down

  5. #5
    Forum Contributor
    Join Date
    01-21-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    116

    Re: Looking for a cell with # with a date range then looking up to the date

    Thank you so much jhren, it is working perfectly. Rep coming your way. Please could you explain ("Sheet1!R3C"&$C$2-42001&":R7C

    I am trying to amend to formulae into my main sheet from the bare bones example sheet. Ant cant get it to work. I am making it into an array. Crtl - shift - Ent etc.



    My sheet1 is called 2015 but having problem with the R3C and R7C bits. I am guess it is Row and Column. My formulae is


    Please Login or Register  to view this content.
    Sheet1 = 2015 My Rows are 4 to 60
    name tag of year is the row of data 1/1/2015 to 31/12/2015 on 1st sheet now 2015
    D9 contains the initials

    From date is in C3
    to date is in C4

    Thank you for your help.

  6. #6
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Looking for a cell with # with a date range then looking up to the date

    Other than what jhren has suggested, you may also try this Array Formula in this case...

    Please Login or Register  to view this content.
    and copy down.

  7. #7
    Forum Contributor
    Join Date
    01-21-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    116

    Re: Looking for a cell with # with a date range then looking up to the date

    Thank you sktneer, your formulae works a charm and I have successfully amended into the real sheet from the example sheet.

    Thank you again for your time.

  8. #8
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Looking for a cell with # with a date range then looking up to the date

    You're welcome. Glad I could help.
    And thanks for the feedback as well.

  9. #9
    Forum Contributor
    Join Date
    01-21-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    116

    Re: Looking for a cell with # with a date range then looking up to the date

    sktneer

    I have just spotted a little extra that is required it needs to look on two different sets of rows. E4 - E28 and E41 - E53

    How can this formulae be amended

    Please Login or Register  to view this content.
    I can't seem to get it to work

    Please Login or Register  to view this content.

    Where named range of lastdos = ='2015'!$E$4:$NP$28

    and lastdosn = ='2015'!$E$41:$NP$53

    Thank you.

  10. #10
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Looking for a cell with # with a date range then looking up to the date

    Do you mean that you need to look for initials in the range '2015'!$E$4:$NP$28 and range '2015'!$E$41:$NP$53 and return the max date from these two ranges?

  11. #11
    Forum Contributor
    Join Date
    01-21-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    116

    Re: Looking for a cell with # with a date range then looking up to the date

    Hi sktneer

    Yes that is correct. thank you for this.

  12. #12
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Looking for a cell with # with a date range then looking up to the date

    Can you post a sample file with the data in these two ranges along with the expected output shown manually?

  13. #13
    Valued Forum Contributor
    Join Date
    05-20-2013
    Location
    Ohio, USA
    MS-Off Ver
    Excel 2013
    Posts
    941

    Re: Looking for a cell with # with a date range then looking up to the date

    Quote Originally Posted by chrisandsally View Post
    Thank you so much jhren, it is working perfectly. Rep coming your way. Please could you explain ("Sheet1!R3C"&$C$2-42001&":R7C

    I am trying to amend to formulae into my main sheet from the bare bones example sheet. Ant cant get it to work. I am making it into an array. Crtl - shift - Ent etc.



    My sheet1 is called 2015 but having problem with the R3C and R7C bits. I am guess it is Row and Column. My formulae is


    Please Login or Register  to view this content.
    Sheet1 = 2015 My Rows are 4 to 60
    name tag of year is the row of data 1/1/2015 to 31/12/2015 on 1st sheet now 2015
    D9 contains the initials

    From date is in C3
    to date is in C4

    Thank you for your help.
    You have the gist of it. R3C & R7C are the start of R1C1 style addresses and the latter part is a conversion formula changing your start and end dates to column numbers in the example. I didn't save my revised copy of your file, but if I recall correctly it became R3C4:R7C11 (i.e. D3:K7)... whereas the column number changes according to the start and end dates.

    If your actual file has the data in row 4 to 60, that exactly what you'd change the 3 of R3C and 7 of R7C to, respectively (R4C and R60C).

    The minus 3 near the end is the column offset from column A to first column of dates (i.e. "dateh1" in example vs. "year" in actual)
    Last edited by jhren; 04-21-2015 at 12:14 PM.

  14. #14
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Looking for a cell with # with a date range then looking up to the date

    Try this and make changes in the range reference as per your actual workbook.

    Please Login or Register  to view this content.
    I think you will need to change C3 to C4. See if this helps.

  15. #15
    Forum Contributor
    Join Date
    01-21-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    116

    Re: Looking for a cell with # with a date range then looking up to the date

    Hi Sktneer and Jhren

    Thank you Jhren for your reply but currently i have used sktneer suggestion.


    The problem is that I have two separate ranges to lookup.

    I have attached another example file

    Help2.xlsx

    Thank you

  16. #16
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Looking for a cell with # with a date range then looking up to the date

    As per your new file, try this......
    Please Login or Register  to view this content.

  17. #17
    Forum Contributor
    Join Date
    01-21-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    116

    Re: Looking for a cell with # with a date range then looking up to the date

    Thank you that works but it picks up the initals with or without the #.

    I need it to look at only #AAA not AAA e9 has the # infront for easy lookup. So close.

    Thank you again, me thinks only one more step.

  18. #18
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Looking for a cell with # with a date range then looking up to the date

    In the suggested formula, the lookup value is D9, change all the instances of D9 to E9.

  19. #19
    Forum Contributor
    Join Date
    01-21-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    116

    Re: Looking for a cell with # with a date range then looking up to the date

    Thank you

    what does this ref do COLUMN($B$41)+1)))=0, The B41 what sheet is this referring to 2015 or console?

    I want to try and learn how your formulae works.

  20. #20
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Looking for a cell with # with a date range then looking up to the date

    My bad....
    Actually it should refer to Sheet 2015, I forgot to include the sheet reference, though it wouldn't make any difference in the calculation but it should have been written with the sheet reference as well.

  21. #21
    Forum Contributor
    Join Date
    01-21-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    116

    Re: Looking for a cell with # with a date range then looking up to the date

    Thank you. Should I enter it in? When you say it make no difference why does if point to that specific cell on that sheet?

  22. #22
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Looking for a cell with # with a date range then looking up to the date

    Yes you should reference the sheet as well, this would be syntactically correct.

  23. #23
    Forum Contributor
    Join Date
    01-21-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    116

    Re: Looking for a cell with # with a date range then looking up to the date

    Thank you so much

    so why that specific reference value, i cant work that out!

  24. #24
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Looking for a cell with # with a date range then looking up to the date

    That will return the column counting of the referenced range like 1,2,3,4.... and so on which will be multiplied with the True and False returned by the conditional statements.

    Just select the various parts of the formula in formula bar and hit F9, that will show you that how the specific part of the formula would work.
    Another way is to evaluate the formula and monitor each step in the calculation. You will find Evaluate Formula under Formula Tab, use it to step through the formula.

  25. #25
    Valued Forum Contributor
    Join Date
    05-20-2013
    Location
    Ohio, USA
    MS-Off Ver
    Excel 2013
    Posts
    941

    Re: Looking for a cell with # with a date range then looking up to the date

    See if this works for you...
    Attached Files Attached Files

  26. #26
    Forum Contributor
    Join Date
    01-21-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    116

    Re: Looking for a cell with # with a date range then looking up to the date

    Thank you jhren.

    That is a nice formula. Could it be amended, as sometimes there is a number after the initial like #AAA5 currently it does not pick this up.

    Thanks

  27. #27
    Valued Forum Contributor
    Join Date
    05-20-2013
    Location
    Ohio, USA
    MS-Off Ver
    Excel 2013
    Posts
    941

    Re: Looking for a cell with # with a date range then looking up to the date

    Change from...
    Please Login or Register  to view this content.
    ...to...
    Please Login or Register  to view this content.
    Last edited by jhren; 04-22-2015 at 11:49 AM.

  28. #28
    Forum Contributor
    Join Date
    01-21-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    116

    Re: Looking for a cell with # with a date range then looking up to the date

    Thank you so much for you help.

+ 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. Replies: 7
    Last Post: 07-14-2017, 12:04 PM
  2. [SOLVED] Macro to match date in data table and copy cell range containing date.
    By 54ed in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-15-2014, 04:52 AM
  3. VBA to enter date range based on date range in above cell
    By Pierce Quality in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-19-2013, 08:45 AM
  4. Mark cell if location matches and date falls between date range
    By DoodlesMama in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-24-2012, 07:54 PM
  5. [SOLVED] Date Filter based on Cell Input - single date or range of dates
    By babaloo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-23-2012, 10:32 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