ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   lookup a value across 15 rows (https://www.excelbanter.com/excel-discussion-misc-queries/230760-lookup-value-across-15-rows.html)

notanexcelguru

lookup a value across 15 rows
 
Here is my problem -

The need to look a certain value say 'desktop' across 15 columns ( 1 row)
and if it is present in any one cell, in the 16th column I need to print
'Desktop'. This data in the rows is what a customer bought on an order, but
the order of the parts in not maintained. Shown in example below

Customer1 desktop server laptop keyboard
Customer2 mouse desktop keyboard laptop
Customer3 server mouse laptop keyboard

I want to come up with

Customer 1 desktop server laptop keyboard
Customer 2 desktop laptop keyboard mouse
Customer 3 server laptop keyboard mouse



Please help, Thank you


dlw

lookup a value across 15 rows
 
Use this formula to search the range for the desired item and display it:

=IF(HLOOKUP("desktop",B1:E1,1)="desktop","desktop" ," ")

"NotanExcelGuru" wrote:

Here is my problem -

The need to look a certain value say 'desktop' across 15 columns ( 1 row)
and if it is present in any one cell, in the 16th column I need to print
'Desktop'. This data in the rows is what a customer bought on an order, but
the order of the parts in not maintained. Shown in example below

Customer1 desktop server laptop keyboard
Customer2 mouse desktop keyboard laptop
Customer3 server mouse laptop keyboard

I want to come up with

Customer 1 desktop server laptop keyboard
Customer 2 desktop laptop keyboard mouse
Customer 3 server laptop keyboard mouse



Please help, Thank you


T. Valko

lookup a value across 15 rows
 
Try this:

=IF(COUNTIF(A2:O2,"desktop"),"desktop","")

Or, use a cell to hold the criteria:

P1 = desktop

=IF(COUNTIF($A2:$O2,P1),P1,"")

Then copy across.

--
Biff
Microsoft Excel MVP


"NotanExcelGuru" wrote in message
...
Here is my problem -

The need to look a certain value say 'desktop' across 15 columns ( 1 row)
and if it is present in any one cell, in the 16th column I need to print
'Desktop'. This data in the rows is what a customer bought on an order,
but
the order of the parts in not maintained. Shown in example below

Customer1 desktop server laptop keyboard
Customer2 mouse desktop keyboard laptop
Customer3 server mouse laptop keyboard

I want to come up with

Customer 1 desktop server laptop keyboard
Customer 2 desktop laptop keyboard mouse
Customer 3 server laptop keyboard mouse



Please help, Thank you





All times are GMT +1. The time now is 11:08 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com