A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

lookup a value across 15 rows



 
 
Thread Tools Display Modes
  #1  
Old May 13th, 2009, 10:33 PM posted to microsoft.public.excel.misc
notanexcelguru
external usenet poster
 
Posts: 6
Default 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

  #2  
Old May 13th, 2009, 10:52 PM posted to microsoft.public.excel.misc
dlw
external usenet poster
 
Posts: 1,600
Default 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

  #3  
Old May 13th, 2009, 11:09 PM posted to microsoft.public.excel.misc
T. Valko
external usenet poster
 
Posts: 15,759
Default 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



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:43 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.