+ Reply to Thread
Results 1 to 21 of 21

If equals

  1. #1
    Registered User
    Join Date
    05-31-2013
    Location
    Somewhere
    MS-Off Ver
    Microsoft 365
    Posts
    80

    If equals

    Good morning!

    I'm hoping someone can give me a hand.

    This is what I am trying to accomplish:

    If a cell within the range of N4:=N53 equals the cells in the range of B6:B36, copy the cell in column B.

    For example, if a date within N4:N53 equals the cell in B8, copy the information in C8.

    Hopefully that makes sense.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: If equals

    I think you need VLOOKUP.

    REGARDS, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: If equals

    or maybe something like this?

    =INDEX($B$6:$B$36,MATCH(N4,$N$4:$N$53,0))
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  4. #4
    Registered User
    Join Date
    05-31-2013
    Location
    Somewhere
    MS-Off Ver
    Microsoft 365
    Posts
    80

    Re: If equals

    Thanks to both of you!

    I tried both, and they aren't really what I am needing (or maybe I am just not doing it right). I need it to do the search and find a match and then copy the information over from the next column.

    I have dates on page 2, cells N4:N53. I also have dates on page 1, cells B6:B36. I need it to do a search. If it finds a date in both page 1 and page 2, I need it to copy information. For example, a date on page 2, N15 matches page 1 B6. I then need the information from page 1 C6, copied into the cell that has the formula.

    Sorry if I wasn't as clear in the first post. I appreciate any help that you can be.

    Thanks!

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: If equals

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  6. #6
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Thumbs up Re: If equals

    Hi bro,

    try the solution in attachment...


    click * to appreciate..
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    05-31-2013
    Location
    Somewhere
    MS-Off Ver
    Microsoft 365
    Posts
    80

    Re: If equals

    Thanks. I see how that could possible work. However, I see a possible issue with the formula due to the way I have set the rest of it up.

    I have reattached your solution with some comments I made. Hopefully it makes it easier for you to understand what I am needing.

    Sorry if I was not clearer earlier.

    conditional lookup (4).xlsx

  8. #8
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    Re: If equals

    hi,

    try This
    =IFERROR(VLOOKUP(N3,July!$B$2:$C$30,2,0),0)

    Punnam

  9. #9
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: If equals

    Try this

    =INDEX(July!$C$2:$C$30,MATCH(N3,July!$B$2:$B$30,0))

  10. #10
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Thumbs up Re: If equals

    hey bro..
    at last your problem is solved...
    much easier this time..
    no arrays...

    check the attachment...

    click * if it helps you in someway..
    Attached Files Attached Files

  11. #11
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: If equals

    Did that help...?
    waiting for reply...

    Vikas Gautam

  12. #12
    Registered User
    Join Date
    05-31-2013
    Location
    Somewhere
    MS-Off Ver
    Microsoft 365
    Posts
    80

    Re: If equals

    Second Call.xlsSorry for the delayed reply. It has been crazy busy and I didn't have two seconds to look it over unitl now. It still doesn't seem to be working the way I was hoping. I have attached a sample document of what I am working on with a note on Sheet1 as to what I'm hoping to accomplish. Hopefully this makes it easier for you to understand what I am trying to do.
    Thanks!

  13. #13
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Thumbs up Re: If equals

    Got the solution..

    check the attachment..

    very good question instead..


    Don't forget to click *, if helped...
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    05-31-2013
    Location
    Somewhere
    MS-Off Ver
    Microsoft 365
    Posts
    80

    Re: If equals

    Thanks! It appears to be working. Sorry to be a bother again... but I like to learn how it works to be able to use it in other areas in the future. Can you explain what each part of the formula is doing?

    Thanks again.... I like to use these roadblocks of mine as a learning opportunity.

  15. #15
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: If equals

    Thanks for the feedback..

    the best way to learn that how a formula works is using formula evaluation

    however I would like to give you a birds eye view of what this formula is doing..

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    First of all I would like to clear that the range A4 : A15 in sheet1 is immaterial here..
    Now the formula..

    Explanation of following part first
    (COUNTIF($N$4:$N$53,July!$B$6:$B$36)

    countif(Range, Criteria)

    this part returns an array of count of each element in July!$B$6:$B$36 in the $N$4:$N$53
    It will return an array like this.. {1;0;0;0;0;0;0;0;0;0;0;0;0} (See formula evaluation..)

    then I got the position of 1 in that respective array using If(array()>0, Row()) function...

    ROW(July!$B$6:$B$36)-ROW(July!$A$5)
    the bold part is an correction factor used to refer rows in respective index ie. July!$C$6:$K$6

    Then I used Index function to return first value in that respective row in the index (July!$C$6:$K$6) ..
    To return other corresponding values, I used Column(A$1) so that when I drag It horizontally I results in next value..

    Again the best way to learn is to use Formula evaluation...

    I think I have very much managed to explain it..
    If not then I am sorry..

    Don't forget to click *, if Helped..

  16. #16
    Registered User
    Join Date
    05-31-2013
    Location
    Somewhere
    MS-Off Ver
    Microsoft 365
    Posts
    80

    Re: If equals

    Thanks. It does help a lot with me understanding it better. I have added other pages identical to the "July" page. But saying the other months. They are using the exact same cell numbers and everything, but when I change the formula from July to August, it doesn't seem to be working proprely. Is there something else I should be changing in the formula as well to make it work properly.

    Sorry to keep bothering you with this problem of mine. I do very much appreciate your assistance on this. I love excel and I love learning more detailed things with it.

  17. #17
    Registered User
    Join Date
    05-31-2013
    Location
    Somewhere
    MS-Off Ver
    Microsoft 365
    Posts
    80

    Re: If equals

    Any help someone could be that would be appreciated.

  18. #18
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: If equals

    Hi.. Jlo..
    can you provide the august worksheet...?

    Vikas Gautam

  19. #19
    Registered User
    Join Date
    05-31-2013
    Location
    Somewhere
    MS-Off Ver
    Microsoft 365
    Posts
    80

    Re: If equals

    WIP.xls

    I have attached the whole document. I am putting the formula you provided me in sheet 1. I have highlighted the ones that are errors to hopefully try and figure out why there are being sent there.

    Thanks!

  20. #20
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Thumbs up Re: If equals

    Enjoy..

    Click following link if wanna know how countif works in this formula..
    https://www.Excel-Buzz.blogspot.in


    Don't forget to click *
    Attached Files Attached Files

  21. #21
    Registered User
    Join Date
    05-31-2013
    Location
    Somewhere
    MS-Off Ver
    Microsoft 365
    Posts
    80

    Re: If equals

    Thanks for all your 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. if column B equals "cash" then column H equals 0
    By im3d in forum Excel General
    Replies: 4
    Last Post: 04-26-2011, 04:43 PM
  2. if a:a (range) equals january and c:c equals gas then add g:g ($)
    By BCOz in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-29-2005, 03:45 PM
  3. Replies: 1
    Last Post: 06-01-2005, 07: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