+ Reply to Thread
Results 1 to 11 of 11

It's probably easy but I don't know how....

  1. #1
    Registered User
    Join Date
    01-20-2014
    Location
    Italy
    MS-Off Ver
    Excel 2003
    Posts
    30

    Question It's probably easy but I don't know how....

    I attach the file so I can explain myself better.
    In column "F" I need a function that, when column "E" is 1, check the MIN of the previous 10 value of column "A" and than put the corresponding value of column "C"

    So, let's say, E12=1--->MIN(A12:A3)=A11 so in F12 I want C11
    than in F24 I want C15 ecc...ecc...

    I hope you can understand what I mean.
    I'm getting addicted to this forum, it's really a lot of help for newbe like me. Thanks
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    08-04-2011
    Location
    UK
    MS-Off Ver
    Excel 2021
    Posts
    346

    Re: It's probably easy but I don't know how....

    in F1 and copy down

    =IF(E12=1,MIN(A3:A12),"")

  3. #3
    Registered User
    Join Date
    01-20-2014
    Location
    Italy
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: It's probably easy but I don't know how....

    Quote Originally Posted by AlanY View Post
    in F1 and copy down

    =IF(E12=1,MIN(A3:A12),"")
    Nope, because I don't need the MIN of column A but the corresponding value of column C

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: It's probably easy but I don't know how....

    Hi Adrin,

    Alan meant to say in F12 put his formula. Then you can pull the formula down the entire column. See the attached. This formula works because of "relative reference" formulas. That means a formula's scope, without dollar signs, is relative to the cell the formula is in. Read http://www.cpearson.com/excel/relative.aspx for more.

    After seeing you want the value in C (above) try this
    =IFERROR(VLOOKUP(IF(E12=1,MIN(A3:A12),""),A3:C12,3,FALSE),"")
    Attached Files Attached Files
    Last edited by MarvinP; 02-05-2015 at 12:15 PM.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  5. #5
    Registered User
    Join Date
    01-20-2014
    Location
    Italy
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: It's probably easy but I don't know how....

    Quote Originally Posted by MarvinP View Post
    Hi Adrin,

    Alan meant to say in F12 put his formula. Then you can pull the formula down the entire column. See the attached. This formula works because of "relative reference" formulas. That means a formula's scope, without dollar signs, is relative to the cell the formula is in. Read http://www.cpearson.com/excel/relative.aspx for more.

    After seeing you want the value in C (above) try this
    =IFERROR(VLOOKUP(IF(E12=1,MIN(A3:A12),""),A3:C12,3,FALSE),"")
    Hi Marvin, I don't know how to explain myself but the problem is that I need values of C not of A in column F. For example in F12 I need 509777073.

  6. #6
    Registered User
    Join Date
    06-27-2008
    Location
    Durban, SA
    Posts
    14

    Re: It's probably easy but I don't know how....

    If you paste this into cell F12:
    =VLOOKUP((IF(E13=1,MIN(A3:A12))),A3:C12,3,FALSE)

    Should work, but returns #N/A if if cell in column E is not 1?

  7. #7
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: It's probably easy but I don't know how....

    I updated my formula and attached sheet. Does it work now?

    Hi again,

    The IfError() function came in 2007 and I see you have 2003 excel. So use this hint to not see those error messages.

    http://answers.microsoft.com/en-us/o...0-6c93b533afe9
    Last edited by MarvinP; 02-05-2015 at 12:35 PM.

  8. #8
    Registered User
    Join Date
    01-20-2014
    Location
    Italy
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: It's probably easy but I don't know how....

    Hi Hardbody, thanks for the answer. Your formula work but it's not good for me. First I have problems with N/A and second I would need one that I can use when the reference value is not in the leftmost column. I mean, I can't always use VLOOKUP, I need to learn how to do it in a middle column.
    At least you understand my problem and partially solve it. Thanks a lot

  9. #9
    Registered User
    Join Date
    01-20-2014
    Location
    Italy
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: It's probably easy but I don't know how....

    Quote Originally Posted by MarvinP View Post
    I updated my formula and attached sheet. Does it work now?

    Hi again,

    The IfError() function came in 2007 and I see you have 2003 excel. So use this hint to not see those error messages.

    http://answers.microsoft.com/en-us/o...0-6c93b533afe9

    Marvin, thanks a lot. That work very good. Can you tell how can I do it without VLOOKUP, if I need to do the same in a column in the middle of the sheet. Really thanks.

  10. #10
    Registered User
    Join Date
    06-27-2008
    Location
    Durban, SA
    Posts
    14

    Re: It's probably easy but I don't know how....

    I think you have to use INDEX and MATCH instead of VLOOKUP, but not familiar with them.

  11. #11
    Valued Forum Contributor
    Join Date
    08-04-2011
    Location
    UK
    MS-Off Ver
    Excel 2021
    Posts
    346

    Re: It's probably easy but I don't know how....

    Quote Originally Posted by AdrinBig View Post
    Nope, because I don't need the MIN of column A but the corresponding value of column C
    ok, try this in F12 and copy down

    =IF(E12=1,INDEX(C:C,MATCH(MIN(A3:A12),A:A,0)),"")

+ 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. Easy one, I think?
    By johnb28 in forum Excel General
    Replies: 4
    Last Post: 05-04-2012, 01:48 AM
  2. Excel 2007 : Easy one, need help
    By steveclug in forum Excel General
    Replies: 1
    Last Post: 02-02-2011, 06:37 PM
  3. [SOLVED] This should be easy...
    By Jerry in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-06-2005, 12:20 PM
  4. Easy one
    By pkbro in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-05-2005, 12:01 PM
  5. new user with easy question? not easy for me
    By speakeztruth in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 06-03-2005, 05:05 PM

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