+ Reply to Thread
Results 1 to 4 of 4

Altering a Vlookup to shift cells up if text matches a certain value

  1. #1
    Registered User
    Join Date
    05-13-2014
    MS-Off Ver
    Excel 2003
    Posts
    19

    Altering a Vlookup to shift cells up if text matches a certain value

    Hi guys,

    I have quite a complicated request which may not even be possible (requiring the use of VBA maybe)!

    Basically, I've inherited a spreadsheet which runs a vlookup on an order number to pull out details of a trade (name the name of the stock, the quantity bought/sold and some additional info).

    For example:

    Order 1
    Cell A1: AAPL US
    Cell A2: 10000
    Cell A3: Tech

    Order 2
    Cell B1: VOD LN
    Cell B2: 20000
    Cell B3: Telecoms

    Etc.


    For stocks that have a name ending in RR (the above two examples end in US and LN respectively), is there a way to get Excel to not only not pull the details of the trade but to also 'delete' that row (so that there are no blanks).

    For example, if Order 3 and 4 are normally:

    Cell C1: TOK RR
    Cell C2: 10000
    Cell C3: Food

    Cell D1: HSBA LN
    Cell D2: 12000
    Cell D3: Bank


    Can I get it so that Order 3 is ignored and Cells C1 - 3 populate as:

    Cell C1: HSBA LN
    Cell C2: 12000
    Cell C3: Bank


    I hope that makes sense!

  2. #2
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Altering a Vlookup to shift cells up if text matches a certain value

    Not very clear..

    Can you please attach a sample workbook?
    Cheers!
    Deep Dave

  3. #3
    Registered User
    Join Date
    05-13-2014
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Altering a Vlookup to shift cells up if text matches a certain value

    Hi,

    Thanks for the reply. Due to confidentiality issues, I can't attach a workbook. Basically, I currently have a normal vlookup that pulls out three bits of information on an order (the name of the stock being traded, the quantity traded and some additional info on the stock)

    Basically, what I want done is when the name of the stock ends in "RR", e.g. "VOD RR" (instead of "VOD LN"), I don't want to pull information on that order. I don't think this part is that hard to accomplish.

    However, normally, each row would have a different order. Obviously if I don't pull information on the order VOD RR, I'll have a blank row. Is there a way to get rid of the blank row (like by pulling the next order)?

    Please let me know if this does not make sense.

    Thanks!

  4. #4
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Altering a Vlookup to shift cells up if text matches a certain value

    Due to confidentiality issues, I can't attach a workbook
    Can you atleast make a sample workbook and attach with desired output?

+ 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. VLOOKUP Partial matches when searched text is longer than actual text
    By mockions in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-23-2015, 11:16 PM
  2. Vlookup for text and add relevant values if text matches in the range
    By misys.til in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-19-2014, 06:11 AM
  3. If Cell Text Matches Any Text From Range, Then Apply VLOOKUP?
    By eliot1171 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-12-2013, 09:41 PM
  4. Changing format of cells that contain multiple matches of text taken from Vlookup
    By fallwire in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-21-2010, 08:50 PM
  5. [SOLVED] similar text matches vlookup
    By [email protected] in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-18-2006, 05:25 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