+ Reply to Thread
Results 1 to 7 of 7

Reverse Lookup with No Row or Column Headings

  1. #1
    Registered User
    Join Date
    07-27-2015
    Location
    Texas, US
    MS-Off Ver
    10
    Posts
    4

    Reverse Lookup with No Row or Column Headings

    So, I have been searching the internet for a way to do this and I cannot find anything. Most of the stuff I see deals with only column searching. Below is what I am trying to accomplish.

    A B C D E
    1 STK STK CTR CTR STK
    2 L L L W
    3 1 2 1 2 ??

    I am looking for a way to search the previous instance of STK and increase the number below it. In the example above, I want to use an IF statement like this:

    IF(AND(D1="CTR",D2="W"), I want to find the previous entry of STK (B1), and increase the number below it (2 --> 3).

    Is there a way to do this?

    Thanks...

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Reverse Lookup with No Row or Column Headings

    Cells cannot change other cells.
    Cells can read other cells and produce results based on other cells, but they can't change them.

    Use VBA to change the values in cells.
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Registered User
    Join Date
    07-27-2015
    Location
    Texas, US
    MS-Off Ver
    10
    Posts
    4

    Re: Reverse Lookup with No Row or Column Headings

    Excel Issue.gif

    I dont want to change it. I want to increase the number found and insert into another cell. Is that still not possible?

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Reverse Lookup with No Row or Column Headings

    IF it always increases by 1, starting in B3 copied to the right

    =COUNTIF($A$1:A$1, B$1)+1
    Does that work for you?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  5. #5
    Registered User
    Join Date
    07-27-2015
    Location
    Texas, US
    MS-Off Ver
    10
    Posts
    4

    Re: Reverse Lookup with No Row or Column Headings

    Nope, that gives me a value of 2. Its hard to me to fathom that Excel doesnt have a way to look backwards for the first occurrence of a word. Basically, if the top column is named CTR and row 2 has a W, then go find the first STK before entering the CTR phase (which is B1:B3, in this instance.). Use the number at B3, increase it by 1 and enter at E3.

    Updated.gif

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Reverse Lookup with No Row or Column Headings

    No, I said to put that formula into B3 and copy to the right. If you do that, then the formula in E3 will be

    =COUNTIF($A$1:D$1, E1)+1

  7. #7
    Registered User
    Join Date
    07-27-2015
    Location
    Texas, US
    MS-Off Ver
    10
    Posts
    4

    Re: Reverse Lookup with No Row or Column Headings

    Hmm... that looks like it's going to work.

    I will play with this some more and see where it leads me.

    Thanks for the knowledge!

+ 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. Macros to lookup column and row headings and extract data
    By ramliedt in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 10-04-2013, 11:33 AM
  2. [SOLVED] Reverse Lookup to Return Column Header (Date)
    By jeversf in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-30-2013, 12:27 PM
  3. Match/Index/Lookup - Searching From Bottom to Top (A reverse lookup maybe)
    By Neutralizer in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-02-2013, 03:55 AM
  4. Need Help For Reverse V-Lookup
    By Abhijeetsjadhav in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-23-2013, 06:03 PM
  5. Reverse lookup?
    By rwhite713 in forum Excel General
    Replies: 5
    Last Post: 07-22-2010, 04:14 AM
  6. [SOLVED] Lookup column headings?
    By RunsWithKnives in forum Excel General
    Replies: 3
    Last Post: 07-25-2006, 07:30 PM
  7. HOW TO REVERSE THE ROW OR COLUMN HEADINGS
    By don in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-06-2005, 10:25 PM
  8. Can I invert a table so row headings are now column headings etc
    By Sharon in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-10-2005, 04:06 PM

Tags for this Thread

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