View Single Post
  #6   Report Post  
DOR
 
Posts: n/a
Default Returning row # using match or index of repeated text in a complex table

You can easily create another column with the company name using the
formula below, which assumes the following:

Your list is in column A starting at A1.
No company name ends in a number (0-9)
All quarter identifications end in a number.

Put the following formula in B2 down:

=IF(ISERROR(VALUE(RIGHT(A2))),A2,B1)

This should put the company name in column B.
Now use RP's formula to find the match for your Company and quarter.

In this case, assuming your search company is in C1 and Quarter in D1,
you would write

=MATCH(C1&D1,B1:Bnn&A1:Ann,0), where nn is the ending row of your list
- entered with Ctl+Shift+Enter, since it is an array formula.

If some company name ends in a number, then you will need a different
formula to put the company name in another column, but I will wait for
your response before suggesting what that might be.

Good luck.


General wrote:
Thanks RP, but that won't quite work. Reason is that the company name
and the quarter are in the same column, not next to each other.

This spreadsheet could be hundreds of companies long, and manually copy
& pasting the company name in a neighboring column would take way too
long. I need the whole entire thing to be automated.

Thanks anyway, please let me know if you have any ideas.

Phil