+ Reply to Thread
Results 1 to 5 of 5

Eliminate intermediate columns

  1. #1
    Registered User
    Join Date
    05-07-2016
    Location
    Ashburn, Virginia
    MS-Off Ver
    2010
    Posts
    11

    Eliminate intermediate columns

    I have a spreadsheet with a column B containing data like this:
    Dark-Shadows-0247.avi
    Dark-Shadows-0248.mp4
    Dark-Shadows-0249.mp4
    Dark-Shadows-0250.mp4
    Dark-Shadows-0251.avi
    Dark-Shadows-0252.avi
    Dark-Shadows-0253.avi
    Dark-Shadows-0254.avi
    Dark-Shadows-0255.avi
    Dark-Shadows-0256.avi
    Dark-Shadows-0257.avi
    Dark-Shadows-0258.avi
    Dark-Shadows-0259.avi
    Dark-Shadows-0260k.avi
    Dark-Shadows-0261.avi
    Dark-Shadows-0262.avi
    Dark-Shadows-0263.mp4
    Dark-Shadows-0264.avi


    I want a count of mp4 files and avi files. So I created a column AA with a formula like =RIGHT(B2,3) which gives me a column containing just "avi" or "mp4". Then at the bottom I can use: =COUNTIF(AA2:AA1226,"mp4") to get the count of mp4 files. There is other stuff encoded in my filenames. That 260k.avi is a kinescope. And column AB has formulas like: =LEFT(RIGHT(B2,5),2) which in the case of a kinescope results in "k." in the column. And then at the bottom, =COUNTIF(AB2:AB1226,"k.") gives me a count of kinescopes. This all works great. I don't even need to hide columns AA, AB, ... since they are so far over. Still, just for the elegance of it, I would like to eliminate these extra columns and use count formulas that work directly on column B. I have tried a number of formulas but none of them work. Is there some easy way to this this?

    I am using Microsoft Office Home and Student 2010 and Excel is version 14.0.7163.5000 (32-bit).

    Finally, note that I have a working solution for everything I need and a heroic substitute like resorting to Visual Basic would not very attractive. At some point, elegance loses out to ease of maintenance. Thanks for any help you can suggest.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Eliminate intermediate columns

    Welcome to the board.

    =COUNTIF($A$1:$A$18, "*.avi")

    =COUNTIF($A$1:$A$18, "*.mp4")
    Entia non sunt multiplicanda sine necessitate

  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: Eliminate intermediate columns

    Here is one way
    enter avi in C2 and mp4 in C3
    then use formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v B C D
    1
    2 Dark-Shadows-0247.avi avi 14
    3 Dark-Shadows-0248.mp4 mp4 4
    4 Dark-Shadows-0249.mp4
    5 Dark-Shadows-0250.mp4
    6 Dark-Shadows-0251.avi
    7 Dark-Shadows-0252.avi
    8 Dark-Shadows-0253.avi
    9 Dark-Shadows-0254.avi
    10 Dark-Shadows-0255.avi
    11 Dark-Shadows-0256.avi
    12 Dark-Shadows-0257.avi
    13 Dark-Shadows-0258.avi
    14 Dark-Shadows-0259.avi
    15 Dark-Shadows-0260k.avi
    16 Dark-Shadows-0261.avi
    17 Dark-Shadows-0262.avi
    18 Dark-Shadows-0263.mp4
    19 Dark-Shadows-0264.avi
    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-07-2016
    Location
    Ashburn, Virginia
    MS-Off Ver
    2010
    Posts
    11

    Re: Eliminate intermediate columns

    Thanks for the fast responses! And =COUNTIF(B3:B1226,"*k.*") is catching the kinescopes.

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Eliminate intermediate columns

    You're welcome.

+ 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. Looking to Eliminate Duplicates between 2 columns.
    By ontheroad1015 in forum Excel General
    Replies: 2
    Last Post: 07-10-2016, 06:45 AM
  2. [SOLVED] Using Array in VBA to eliminate blank columns in a row
    By NitroN in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-09-2013, 08:37 AM
  3. [SOLVED] eliminate unwanted columns
    By marreco in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-03-2012, 08:36 PM
  4. Comparing columns to eliminate same data
    By mnatanzon in forum Excel General
    Replies: 6
    Last Post: 02-17-2010, 06:20 PM
  5. Eliminate Text-To-Columns Prompt
    By Blewyn in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-12-2007, 11:40 PM
  6. [SOLVED] Eliminate Duplicate Rows - Add columns Accordingly
    By meendar in forum Excel General
    Replies: 1
    Last Post: 04-11-2006, 12:20 PM
  7. Eliminate unused columns
    By jlbreyer in forum Excel General
    Replies: 3
    Last Post: 06-20-2005, 03: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