+ Reply to Thread
Results 1 to 3 of 3

Return First Expense Code

  1. #1
    Registered User
    Join Date
    08-20-2014
    Location
    san francisco, ca
    MS-Off Ver
    Excel2021
    Posts
    28

    Return First Expense Code

    I am a novice and working with a data output into excel that is very "dirty" and with lots of inconsistencies preventing easy re-formatting of the data.

    In the attached workbook I have a column with House #s. I need to return the Charge (Column M) corresponding to the first occurrence of Expense Code Q associated with a particular House #. Difficulties I am encountering:

    1. The House Column contains a mix of (1) numbers formatted as text, with irrelevant [text] interspersed throughout the House Column
    2. Spacing between columns
    3. Trickiest part of the Code will be writing something that extracts the Charge associated with the first occurrence of "Q" in between identifying House #


    Thank in advance you so much for your help. This website has been enormously beneficial for me as I try to learn VBA.
    Attached Files Attached Files

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

    Re: Return First Expense Code

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


    Adjust the number of rows (50 in the example above) as required.
    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 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,366

    Re: Return First Expense Code

    Thanks for the rep.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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] VBA code to assist with overwriting of expense
    By sintek in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-05-2016, 06:46 AM
  2. A dymanic formula to return the expense for the current month
    By CA_needing_help in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-30-2015, 10:37 PM
  3. [SOLVED] Expense Report Help
    By bobrobs in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-04-2014, 06:45 PM
  4. [SOLVED] Expense spreadsheet to automatically code to the selected cost centre
    By MushroomFace in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-05-2013, 05:59 AM
  5. Need help!! REV/COS/EXPENSE formulas
    By elemntz in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-12-2012, 02:56 PM
  6. Expense Sheet
    By TheOneBillyX in forum Excel General
    Replies: 2
    Last Post: 01-09-2012, 03:39 AM
  7. Expense chart
    By Alive in forum Excel General
    Replies: 0
    Last Post: 04-19-2007, 10:09 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