+ Reply to Thread
Results 1 to 12 of 12

How to Bring back the Value of the top of the column

  1. #1
    Registered User
    Join Date
    07-23-2015
    Location
    Barcelona
    MS-Off Ver
    2016
    Posts
    19

    Unhappy How to Bring back the Value of the top of the column

    Hello Guys

    I have been struggle myself trying to do a sort of (offset, Index or whatever)
    What I basically need to do is return the value that is in the top of the column
    Like I was doing a kind of (un-offset)


    In the spreadsheet attached there is a list of people and jobs that they were on
    When I chose a job number I need to bring back who was on that job, there is always more than one person in the same job

    I attached the spreadsheet

    Can anybody help me, please?
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,771

    Re: How to Bring back the Value of the top of the column

    in B13 and copy down

    =IFERROR(INDEX($B$3:$H$3,,MATCH($B$12,$B4:$H4,0)),"")

    However if the job is not on consecutive days you will get a blank "name"

    e.g. change Job123 to Job124 on any day.

  3. #3
    Registered User
    Join Date
    07-23-2015
    Location
    Barcelona
    MS-Off Ver
    2016
    Posts
    19

    Re: How to Bring back the Value of the top of the column

    Hello, that would be a problem cos the Jobs are not on consecutive days
    My real spreadsheet is much bigger, I Basically have 197 names and one full year of dates
    But this will definitely help me, thanks
    Let’s see if somebody else knows anything
    Maybe insert a Macro to remove the blank Lines

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,771

    Re: How to Bring back the Value of the top of the column

    Put this in column C13 to remove blanks

    =IFERROR(IF(ROWS(C$13:C13)>COUNTA($B$13:$B$200),"",INDEX($B$13:$B$200,SMALL(IF(B$13:B$200<>"",ROW(B$13:B$200)-12),ROWS(C$13:C13)))),"")

    Enter with Ctrl+Shift+enter

  5. #5
    Registered User
    Join Date
    07-17-2015
    Location
    Shiraz,Iran
    MS-Off Ver
    MS 2010
    Posts
    12

    Re: How to Bring back the Value of the top of the column

    Hi,
    Please check the attachment.
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    08-07-2015
    Location
    AB, Canada
    MS-Off Ver
    Excel 2013 x64
    Posts
    132

    Re: How to Bring back the Value of the top of the column

    This questions wasn't originally posted looking for a VBA solution, but I have one for you if you can't find a formula solution that fits your needs.

    Insert a module in your workbook and paste the following code.

    Please Login or Register  to view this content.
    Then you can use the formula in cell B13 as follows:

    Please Login or Register  to view this content.
    The first section of this custom function is where you put the job code you're looking to match.
    The second section is the entire range with the NAMES IN THE FIRST SELECTED ROW.
    The third section shows which matching employee you want returned (put a 1 and it will return the first matching employee, put a 2 and it will return the second matching employee, etc....)

    I hope you find a solution that doesn't require a custom function, but you've got this as a backup at least!
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    07-23-2015
    Location
    Barcelona
    MS-Off Ver
    2016
    Posts
    19

    Re: How to Bring back the Value of the top of the column

    I am trying all these options
    That’s very interesting
    Especially VBA
    Last edited by Diego Santos; 08-17-2015 at 07:00 PM.

  8. #8
    Registered User
    Join Date
    07-23-2015
    Location
    Barcelona
    MS-Off Ver
    2016
    Posts
    19

    Re: How to Bring back the Value of the top of the column

    Hello ThirdFret

    It worked in my big spreadsheet, I am not really good at VBA, thanks

    After getting the names I need to know how many days the guys worked in each month

    I want to enter with the month in B10
    And I’d like to have the answer in C13, C14 ….

    If I chose Job 123
    Paul worked 2 days
    Alejandro worked 0 days cos he worked in September
    Colin worked 1 day
    Denis worked 1 day


    Do you know this question as well?

    thanks

  9. #9
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,771

    Re: How to Bring back the Value of the top of the column

    base on ThirdFret file:

    date in B10: 01/08/2015

    in C13 ...

    =IF(B13="","",SUMPRODUCT(($B$3:$H$3=$B13)*($B$4:$H$7=$B$12)*(MONTH($A$4:$A$7)=MONTH($B$10))))

    Copy down

  10. #10
    Forum Contributor
    Join Date
    08-07-2015
    Location
    AB, Canada
    MS-Off Ver
    Excel 2013 x64
    Posts
    132

    Re: How to Bring back the Value of the top of the column

    The following works well for me. Keep in mind this is an ARRAY FORMULA WHICH IS ENTERED BY PRESSING CTRL+SHFT+ENTER, NOT JUST ENTER.

    Please Login or Register  to view this content.
    I've attached the file again, for reference, and included a larger test data set.

    Hope this helps.
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    07-23-2015
    Location
    Barcelona
    MS-Off Ver
    2016
    Posts
    19

    Re: How to Bring back the Value of the top of the column

    Thanks very much
    Can I change this to solved ?

  12. #12
    Forum Contributor
    Join Date
    08-07-2015
    Location
    AB, Canada
    MS-Off Ver
    Excel 2013 x64
    Posts
    132

    Re: How to Bring back the Value of the top of the column

    If you feel we've adequately answered your question I think you should! (just under Thread Tools at the top)

    Cheers!

+ 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] Find value that doesn't match and bring back column heading
    By Keelin in forum Excel General
    Replies: 20
    Last Post: 02-13-2015, 10:16 AM
  2. Bring Back Most Frequently Used Word in a Column
    By martinpgibson in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-14-2014, 05:34 PM
  3. Array Formula Lookup - Bring back Lowest Date + Bring Back Cell Location
    By Matt1998 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-04-2014, 12:08 PM
  4. [SOLVED] Stop Vlookup bringing back 0's or #REF! and bring back blanks instead
    By Carling73 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-30-2013, 04:43 PM
  5. [SOLVED] Bring back a name in one column based on criteria in 2 other columns
    By BillDoor in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-22-2013, 08:07 AM
  6. Replies: 0
    Last Post: 01-29-2013, 01:46 PM
  7. Bring back the old help format!
    By John Przybylski in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-05-2005, 02:06 PM

Tags for this Thread

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