+ Reply to Thread
Results 1 to 3 of 3

Formula ignoring spaces within cell

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    05-15-2015
    Location
    Orlando, FL
    MS-Off Ver
    Office Standard 2016
    Posts
    269

    Formula ignoring spaces within cell

    Hi Everyone,

    Is it possible, on formulas such as a VLookup, or a Index/Match, to ignore spaces within the cell values? My Query Data returns values that often times has 6 spaces in front of it. For example: " 6101093". Can you set a formula to ignore spaces in front of a value, no matter how many spaces are there? I know i could make another column and use a Left/Right formula to ignore the spaces, but every time I refresh the query, it won't update these formulas unless I do it manually.

    Any ideas/help would be greatly appreciated!

    Take care.

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

    Re: Formula ignoring spaces within cell

    Try TRIM() round the lookup value:

    =VLOOKUP(TRIM(lookup_value),lookup_array,column,TRUE/FALSE)
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,859

    Re: Formula ignoring spaces within cell

    You had marked the thread as solved before I posted! Have you found your answer yourself?

+ 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: 8
    Last Post: 11-26-2015, 12:46 PM
  2. [SOLVED] Formula to add extra spaces preceding characters in cell
    By NS4Excel in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-21-2015, 04:48 PM
  3. if statemnt ignoring formula on the cell that they are refering to
    By luis6777 in forum Excel Formulas & Functions
    Replies: 37
    Last Post: 06-13-2014, 03:33 PM
  4. [SOLVED] Formula to extract emails when there is no spaces in the cell
    By nieyasmela in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-10-2013, 07:54 AM
  5. fill a cell with blank spaces using excel formula
    By Lakshminarasimhan in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 05-12-2013, 11:15 AM
  6. Replies: 4
    Last Post: 03-19-2012, 03:05 PM
  7. Replies: 1
    Last Post: 03-19-2012, 09:43 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