+ Reply to Thread
Results 1 to 23 of 23

COUNTIF? or VLOOKUP for 2 column/texts

  1. #1
    Registered User
    Join Date
    11-07-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    58

    COUNTIF? or VLOOKUP for 2 column/texts

    Hi, i'm very confused on which formula to use when it comes to counting certain text. for example


    1st sheet
    Please Login or Register  to view this content.

    How do I extract the data from sheet 1 so I can find the amount of doors, Ideally, I would want to return the end result as
    Sheet 2

    Please Login or Register  to view this content.
    Can someone possibly help me with this function?

    I only understand for 1 variable, but when I need to match 2 texts, how is this possible?

    Regards,
    liqt
    Last edited by liqt; 01-26-2017 at 08:26 PM.

  2. #2
    Forum Contributor
    Join Date
    05-06-2016
    Location
    Cluj, Romania
    MS-Off Ver
    2007-2010
    Posts
    220

    Re: COUNTIF? or VLOOKUP for 2 column/texts

    Hi,

    For Total Buildings use this array formula (Ctrl+Shift+Enter when inserted)
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and for total doors (regular formulas)
    Formula: copy to clipboard
    Please Login or Register  to view this content.

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

    See attached
    Attached Files Attached Files

  3. #3
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: COUNTIF? or VLOOKUP for 2 column/texts

    try this one:
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    11-07-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    58

    Re: COUNTIF? or VLOOKUP for 2 column/texts

    This doesn't seem to work for me when I try to add more data? I get only #VALUE! or Data becomes blank like its not registered? as the end result if I try to add more letters/doors

    also I want to try get the data to the 2nd sheet by using the data from 1st sheet
    Last edited by liqt; 01-26-2017 at 08:55 PM.

  5. #5
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: COUNTIF? or VLOOKUP for 2 column/texts

    I see you are not familiar with PivotTable.
    Ok, I give up

  6. #6
    Registered User
    Join Date
    11-07-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    58

    Re: COUNTIF? or VLOOKUP for 2 column/texts

    I'm not looking for pivot table unfortunately. I've been trying to figure this out with COUNTIF/VLOOKUP and i'm so lost.

  7. #7
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: COUNTIF? or VLOOKUP for 2 column/texts

    With PivotTable you can add more data and change place of the Pivot Table also.
    Simply change source from ribbon and refresh
    But ok if you prefer formulas
    Last edited by sandy666; 01-26-2017 at 09:08 PM.

  8. #8
    Registered User
    Join Date
    11-07-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    58

    Re: COUNTIF? or VLOOKUP for 2 column/texts

    Is this even possible? it seems from TubyBTH but when I decide to change some names/values, it just goes to bust. I'm pretty sure I'm changing the correct array/cell.

    If anyone can enlighten me or perhaps help me another way? using VLOOKUP as I'm trying to get across 1 spreadsheet to another.

  9. #9
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: COUNTIF? or VLOOKUP for 2 column/texts

    Note that the solution from TudyBTH just covers the range of data that you started with, i.e. from A2 to B6, so if you add more data you will need to change the row references from 6 to suit.

    Note also that the first formula is an array formula, so if you change anything in that formula you must use Ctrl-Shift-Enter to commit it, rather than the usual < Enter >.

    Hope this helps.

    Pete

  10. #10
    Registered User
    Join Date
    11-07-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    58

    Re: COUNTIF? or VLOOKUP for 2 column/texts

    Ah you are right, this worked when I tested on TudyBTH. I will try implement this to my spreadsheet accordingly - will post my result at the end.

    i didn't do the shift/ctrl/enter which I forgot but may I ask why did that work rather than simply enter?

  11. #11
    Registered User
    Join Date
    11-07-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    58

    Re: COUNTIF? or VLOOKUP for 2 column/texts

    Sorry to double post but this is giving me a headache when implementing onto my spreadsheet, trying to change the correct formula but seems I cant do it.
    The formula should still be ok with using another sheet right? like pulling data from 1 sheet to sheet 2.

  12. #12
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: COUNTIF? or VLOOKUP for 2 column/texts

    try with this one
    Sheet RESULT, cell A2 (confirm by Control+Shift+Enter) array formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    drag down as far as you need but change range first to suit.
    and
    Sheet RESULT cell B2 (standard formula)
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    drag down and accross as far as you need but change range first to suit.
    Attached Files Attached Files
    Last edited by sandy666; 01-26-2017 at 10:40 PM.

  13. #13
    Registered User
    Join Date
    11-07-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    58

    Re: COUNTIF? or VLOOKUP for 2 column/texts

    Quote Originally Posted by sandy666 View Post
    try with this one
    Sheet RESULT, cell A2 (confirm by Control+Shift+Enter) array formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    drag down as far as you need but change range first to suit.
    and
    Sheet RESULT cell B2 (standard formula)
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    drag down and accross as far as you need but change range first to suit.
    With your spreadsheet, if I decide the change the words from Building, its fine. But when I change the colour like "Blue" into QWERTY for example, the figure disappears from SOURCE sheet of yours, why is that? I don't see any colour name in your code that is bound to it? or am I missing something

  14. #14
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: COUNTIF? or VLOOKUP for 2 column/texts

    If you change colour from Red to QWERTY on SOURCE sheet you need change the same colour Red to QWERTY on RESULT sheet
    On RESULT sheet colours are Headers

    If you want add any colour, e.g. Grey, add it to the colour column on SOURCE sheet but you need add the same colour on RESULT sheet as next Header and drag formula to the right and down like I said in previous post.
    Last edited by sandy666; 01-26-2017 at 11:03 PM. Reason: typo

  15. #15
    Registered User
    Join Date
    11-07-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    58

    Re: COUNTIF? or VLOOKUP for 2 column/texts

    oh my god, no wonder.. I didn't know you included the headers as part of the table. either i'm stupid or that it's 3am to not think correctly >_>;

    I just managed to do it change it now, lets see if I can finally implement it on my own sheet now.. zzz

    I appreciate all the help from everyone so far.

  16. #16
    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: COUNTIF? or VLOOKUP for 2 column/texts

    If you change all the values "Blue" in sheet "source" to "qwerty", unless you ALSO change cell c1 on result from "blue" to "qwerty", then the qwerty values will be missed.

    OR do you ALSO want a formula that will automatically list the unique values from source column B along row 1 of sheet "result"?? If so, use this array formula in Result, B1, copied across:

    =IFERROR(INDEX(SOURCE!$B$2:$B$20, MATCH(0, IF(ISBLANK(SOURCE!$B$2:$B$20), 1, COUNTIF($A$1:A1, SOURCE!$B$2:$B$20)), 0)),"")

    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...
    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

  17. #17
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: COUNTIF? or VLOOKUP for 2 column/texts

    4:06 AM

  18. #18
    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: COUNTIF? or VLOOKUP for 2 column/texts

    It might be 0406 for you, but I'm currently in Thailand!!

  19. #19
    Registered User
    Join Date
    11-07-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    58

    Re: COUNTIF? or VLOOKUP for 2 column/texts

    Thank you so f**king much. This solved my issue. I been on this idea for so damn long. I appreciate everything. Sorry for the caps lock but i struggled for like 6 hours.

  20. #20
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: COUNTIF? or VLOOKUP for 2 column/texts

    Location should be changed automatically From N.Ireland to Thailand

  21. #21
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: COUNTIF? or VLOOKUP for 2 column/texts

    Glad to help

    If problem is resolved it's always a good practice to click on Add Reputation star to person(s) who helped you (anyone else can do it also) and mark thread as Solved. Thanks

  22. #22
    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: COUNTIF? or VLOOKUP for 2 column/texts

    You're welcome.

    Sandy: go back to sleep!!

  23. #23
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: COUNTIF? or VLOOKUP for 2 column/texts

    Gleen, later, later.
    At night nobody making pain in a...

+ 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. Replies: 4
    Last Post: 01-07-2016, 03:27 AM
  2. Countif containing text but not including other specific texts
    By camajto in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-22-2015, 11:31 AM
  3. Equavalent formula for Countif in cell address instead of texts
    By thilag in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-14-2014, 05:12 AM
  4. [SOLVED] Do vlookup looking for texts
    By medo82006 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-23-2013, 06:56 PM
  5. [SOLVED] VLOOKUP containing specific texts
    By JakeMann in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-25-2013, 11:48 AM
  6. Replies: 1
    Last Post: 12-18-2012, 04:09 AM
  7. Separate texts with the : column, how!?
    By marky1990 in forum Excel General
    Replies: 1
    Last Post: 08-01-2011, 08:50 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