+ Reply to Thread
Results 1 to 9 of 9

How to find what cell containsvalue and get another value in the same column

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    03-14-2005
    Location
    Sweden
    MS-Off Ver
    Office 365
    Posts
    329

    How to find what cell containsvalue and get another value in the same column

    Hello.

    I have an order sheet designed this way:

    Column A: Customer
    Column B: Part number
    Column C: Order number
    Column D - AF: Delivery week for the ordernumber.

    On each row the part number quantity is placed in the week column.

    Please see the attached workbook

    How do I make an offset function that finds the delivery week for each order based in the quantity data on each row
    See the workbook for more info.
    Bok13.xlsx

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

    Re: How to find what cell containsvalue and get another value in the same column

    You may try something like this....

    In L3
    =IF(COUNTA(D3:K3)>0,INDEX($D$2:$K$2,MATCH(TRUE,INDEX(D3:K3<>"",),0)),"")
    and copy down.
    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 Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2504
    Posts
    13,620

    Re: How to find what cell containsvalue and get another value in the same column

    See attached
    Attached Files Attached Files

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

    Re: How to find what cell containsvalue and get another value in the same column

    I think Pepe was lazy enough to type the suggested formula in his post itself and uploaded a workbook, so on his behalf I am typing his suggested formula here for members who don't want to open an attachment but still want to see the another approach to achieve the desired output...

    Pepe's Formula:
    =INDEX($D$2:$K$2,(SUMPRODUCT(--($D3:$K3<>""),COLUMN($A3:$H3))))

  5. #5
    Forum Contributor
    Join Date
    03-14-2005
    Location
    Sweden
    MS-Off Ver
    Office 365
    Posts
    329

    Re: How to find what cell containsvalue and get another value in the same column

    It works but now I am curious. Why the column A3:H3 at the end. Why not A3:K3?

  6. #6
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,941

    Re: How to find what cell containsvalue and get another value in the same column

    =LOOKUP(2,1/D3:L3,D$2:L$2)
    Try this and copy towards down
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  7. #7
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2504
    Posts
    13,620

    Re: How to find what cell containsvalue and get another value in the same column

    A3:H3 serves as a counter and returns an array 1,2,3,...8 which then gives the position in the D2:K2 row

    Also A:K would not work with sumproduct as the arrays have to contain the same number of elements

  8. #8
    Forum Contributor
    Join Date
    03-14-2005
    Location
    Sweden
    MS-Off Ver
    Office 365
    Posts
    329

    Re: How to find what cell containsvalue and get another value in the same column

    Perfect. I understand! Thanks for your help

  9. #9
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,941

    Re: How to find what cell containsvalue and get another value in the same column

    Is post no 5 not worked?

+ 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. Find 1st unique Value on Column and Insert certain Word on cell on left Column
    By Wldlife23 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-16-2013, 10:02 AM
  2. [SOLVED] Macro to find the empty cell in a column and copy a adjacent row to another column.
    By naga in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-18-2013, 07:44 AM
  3. Find last cell in column B, message box contents of column A
    By Nu2Java in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-03-2013, 11:27 AM
  4. Replies: 4
    Last Post: 05-26-2013, 05:54 PM
  5. macro to find first blank cell in a column cut the value from left adjacent column
    By willykin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-01-2012, 09:23 AM
  6. Range.Find to find column and place value in next available cell in one line
    By davegugg in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-02-2011, 10:41 AM
  7. Loop to find cell, paste to new column. Turn 1 column into many.
    By d0tc0m in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-14-2011, 09:51 AM
  8. Replies: 8
    Last Post: 08-06-2009, 09:02 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