+ Reply to Thread
Results 1 to 13 of 13

Check if ColumnName exists based on specific TableName

  1. #1
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Check if ColumnName exists based on specific TableName

    Hello,

    i have table like here:

    TableName|ColumnName
    Deployments|Topology
    Deployments|Subscription
    Deployments|Region
    Table1|Col1
    Table1|Col2
    Table1|Col3

    And now what i want to get is to find out if "Topology" column exists.

    So this is grouping by TableName, not table column.

    How can i do this using formula?
    Attached Images Attached Images
    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,780

    Re: Check if ColumnName exists based on specific TableName

    In G13:

    =IF(COUNTIFS([ColumnName],"*Topology",[TableName],[@TableName])>0,"Exists","NotExists")
    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 Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Re: Check if ColumnName exists based on specific TableName

    Thank you,

    works perfect.

    Why did you sue "*Topology"?

    Best,
    Jacek

  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,780

    Re: Check if ColumnName exists based on specific TableName

    Because there is a huge space before that word in column F (looks like a tab stop) - click on F13 and look at the formula bar.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    You can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

  5. #5
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Re: Check if ColumnName exists based on specific TableName

    Thanks!

    Jacek

  6. #6
    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,780

    Re: Check if ColumnName exists based on specific TableName

    You're welcome.

  7. #7
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,879

    Re: Check if ColumnName exists based on specific TableName

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not provided the required cross-post link(s) here.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important.

    (Note: this requirement is not optional. No help to be offered until the link is provided.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  8. #8
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Re: Check if ColumnName exists based on specific TableName

    Hello alansidman,

    thank you for your post.
    Where i posted the same question about solving the issue with formula? Can you please provide the link ?

    Best,
    Jacek
    Last edited by jaryszek; 10-22-2021 at 12:26 AM.

  9. #9
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,879

    Re: Check if ColumnName exists based on specific TableName

    Looks like the same question here ----->https://www.myonlinetraininghub.com/...specific-value.

  10. #10
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Re: Check if ColumnName exists based on specific TableName

    Ok,

    so lets me understand this. If i want to get solution in postgres and power query and vba and formula i should ask about them in one topic in Excel forum?

    Best,
    Jacek

  11. #11
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,879

    Re: Check if ColumnName exists based on specific TableName

    Why Not? Otherwise, you are wasting someone's time as there are always more than one way to solve a problem. It is your choice which solution you wish to use. Often times OPs only want a solution and will indicate that they are open to multiple options, ie. VBA, Formula, PQ, Pivot Table, etc.

  12. #12
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Re: Check if ColumnName exists based on specific TableName

    ok,

    no problem i will be always asking about 3 solutions (power Query, VBA, Formula) and i will be bumping post to get 3 of them. I am always comparing few methods and and i want to fully understand the issue. It should be posted in Excel general?

    But i will be not posting the same data which i used in postgres or python forums - they are just not related

    Best,
    Jacek

  13. #13
    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,780

    Re: Check if ColumnName exists based on specific TableName

    We had this conversation only yesterday, Jacek. One thread per issue, regardless if the type of solution you want.

+ 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. Check if value exists in a table or range based on column name
    By JackBauer in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-11-2019, 01:05 PM
  2. [SOLVED] How to check if a sheet with specific name exists in a closed workbook
    By ImranBhatti in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-01-2019, 06:49 AM
  3. HOW CHECK FILE.NAME HAS EXISTS OR NOT IN FOLDER,if not exists then copy
    By daboho in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-13-2018, 03:50 AM
  4. Check if file exists based on value in specified cell
    By Andy Swain in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-06-2018, 09:16 AM
  5. Check if specific file exists, and update cells based on this
    By lawrence24 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-18-2017, 07:35 AM
  6. CHECK if picture with a specific name exists and, if so, delete it
    By Josiah in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-15-2016, 08:27 AM
  7. Check if Specific Visible Worksheet Exists
    By BEEJAY in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-24-2011, 11:35 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