+ Reply to Thread
Results 1 to 6 of 6

Not sure whether to use Vlookup or IF AND THEN or combo???

  1. #1
    Registered User
    Join Date
    01-20-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2010
    Posts
    61

    Not sure whether to use Vlookup or IF AND THEN or combo???

    Thanks in advance for all the great help I've received here.

    Need help again. As always..... there are usually 6 different ways to accomplish the same goal in excel YEAH EXCEL!!!!

    I have a sheet of hundreds of transactions as line items and I need it all be changed on another sheet to be column items and totaled at the end. I've attached a sample book

    I've figured out the way to return the dollar value in column 7 if the date is found in SHEET1 by using the VLOOKUP

    But now I'm trying to figure out how to add another logic test to the formula.

    I know its simple but it's eluding me. WHAT am I missing here?
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,970

    Re: Not sure whether to use Vlookup or IF AND THEN or combo???

    Are you still using Excel 2010? If not, please update your forum profile NOW.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Not sure whether to use Vlookup or IF AND THEN or combo???

    Try:
    =IFERROR(INDEX(Data!$G$1:$G$100,MATCH(1,(Data!$A$1:$A$100=$A14)*(ISNUMBER(SEARCH(B$13,Data!$E$1:$E$100))),0)),"")

    copied across and dnown. Please refer to the file, as I deleted a few cells!!
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,970

    Re: Not sure whether to use Vlookup or IF AND THEN or combo???

    Maybe this copied across and down?

    =INDEX(Data!$G$2:$G$7,MATCH(1,(Data!$A$2:$A$7=$A14)*(Data!$E$2:$E$7=C$13&" Charge"),0))

    **Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).
    Attached Files Attached Files

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Not sure whether to use Vlookup or IF AND THEN or combo???

    Having seen Ali's reply... which corrects an omission that I made... AND you're still using Excel 2010, you can avoid the need to array enter the formula by changing it to

    =IFERROR(INDEX(Data!$G$1:$G$100,MATCH(1,index((Data!$A$1:$A$100=$A14)*(ISNUMBER(SEARCH(B$13,Data!$E$1:$E$100))),0),0)),"")

    with this one, a simple Enter is sufficient.

  6. #6
    Registered User
    Join Date
    01-20-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2010
    Posts
    61

    Re: Not sure whether to use Vlookup or IF AND THEN or combo???

    Thank you both. I was somehow afraid this would get into Formulas 102!!

    Yes! I am still using 2010. Haven't been compelled nor forced to change yet.

    So I took the formula you provided Glenn, and made a couple of modifications. It failed at row 100. I have hundreds of rows. Just replaced it with like 10000!
    I copied it down and across and everything worked great!!
    Except... when I inserted another column to give a value for when Late Charges were accessed. (Didn't see that at first. It didn't happen till about row 200).
    So I simply inserted another column on the results page as column E and copied the formula over and then down. Never picked up the late charges

    Ahhh. just figured it out. All the charges are posted on the 1st, as is the date on the results page.
    The late charges don't post till the 9th. So it isn't picking up those charges.

    Its only 15 out of hundreds. I'll copy them manually! LOL

    Thanks again. Love working with you all. It humbles me every time.

+ 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] Excel 2010 VBA – Combo Box Options– Clear cell/box in 2nd Combo when 1st Combo selected
    By theshybutterfly in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-17-2013, 07:25 PM
  2. Combo box and vlookup
    By SkiesOfLust in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-14-2013, 01:50 AM
  3. Combo Box and Vlookup
    By SuperiorWitt in forum Excel General
    Replies: 1
    Last Post: 09-14-2011, 02:02 AM
  4. Excel 2007 : VLookup or combo box
    By sms2luv in forum Excel General
    Replies: 1
    Last Post: 12-18-2010, 06:48 PM
  5. vlookup from a combo box?
    By MA via OfficeKB.com in forum Excel General
    Replies: 3
    Last Post: 07-08-2005, 06:05 PM
  6. [SOLVED] Vlookup from Combo Box
    By ACase in forum Excel General
    Replies: 2
    Last Post: 03-23-2005, 02:06 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