Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.setup
Khoshravan
 
Posts: n/a
Default look for a pipeID in a column and returns "broken" result

I have a column of pipeID (1400 IDs).
I have a column of Target pipes. (78pipe IDs)
I want a command to look Target pipes in pipeID and writes broken in front
of it if it finds in pipeID column and leave empty if it couldn't find. I
think I have to combine Hlookup and if command but I couldn't recognize how.
Will be happy if there is any help.
--
Rasoul Khoshravan Azar
Civil Engineer
Osaka, Japan
  #2   Report Post  
Posted to microsoft.public.excel.setup
Pete_UK
 
Posts: n/a
Default look for a pipeID in a column and returns "broken" result

Assume your pipeIDs are in column A from A2 to A1400. Assume your
Target pipes are in column C, beginning with C2. Enter this formula in
D2:

=IF(ISNA(VLOOKUP(C2,A$2:A$1400,1,0)),"","Broken "&C2)

Copy the formula down for as many items as you have in column C.

Hope this helps.

Pete

  #3   Report Post  
Posted to microsoft.public.excel.setup
Khoshravan
 
Posts: n/a
Default look for a pipeID in a column and returns "broken" result

Thanks a lot. That was a wonderfull solution. You saved me a lot of time. How
should I thank you?

--
Rasoul Khoshravan Azar
Civil Engineer
Osaka, Japan


"Pete_UK" wrote:

Assume your pipeIDs are in column A from A2 to A1400. Assume your
Target pipes are in column C, beginning with C2. Enter this formula in
D2:

=IF(ISNA(VLOOKUP(C2,A$2:A$1400,1,0)),"","Broken "&C2)

Copy the formula down for as many items as you have in column C.

Hope this helps.

Pete


  #4   Report Post  
Posted to microsoft.public.excel.setup
Khoshravan
 
Posts: n/a
Default look for a pipeID in a column and returns "broken" result

Dear Pete
Thank you very much for nice solution which moved me completely.
In the next step, I have to do this task for 50 earthquke scenarios, which
means in each earthquake scenario, around 100 pipes broken (Targer Pipes)
(number of broken pipes is not fixed in each scenario and differes from case
to case. For case one it was 78). Info of broken pipes for each scenario is
stored in one sheet. So I have 50 sheets, named run1 to run 50.
Maybe the best way is to write a MAcro.
I am not at wroting macro so I am looking for another easier way.
My problem is how to change run"i" sheet number when copying the formula you
mentioned, as it look to different sheets in each scenario (run1, run2,...
run50).
Woul be happy to get your opinion.
regards
rasoul

--
Rasoul Khoshravan Azar
Civil Engineer
Osaka, Japan


"Pete_UK" wrote:

Assume your pipeIDs are in column A from A2 to A1400. Assume your
Target pipes are in column C, beginning with C2. Enter this formula in
D2:

=IF(ISNA(VLOOKUP(C2,A$2:A$1400,1,0)),"","Broken "&C2)

Copy the formula down for as many items as you have in column C.

Hope this helps.

Pete


  #5   Report Post  
Posted to microsoft.public.excel.setup
Pete_UK
 
Posts: n/a
Default look for a pipeID in a column and returns "broken" result

I would suggest that you have your reference data (1400 pipes) in a
sheet called "data", and that you have the target pipe data in each of
your "run" sheets. That way your formula would always reference back to
one sheet, as follows:

=IF(ISNA(VLOOKUP(C2,'data'!A$2:A$1400,1,0)),"","Br oken "&C2)

You could set up "run_x" sheet with this formula in D2 and use this as
a template to produce run1, run2, run3 sheets etc, just by CTRL-drag.
Then, when you add the target pipes to C2 downwards in each of the
"run" sheets, all you need to do is to select cell D2 and double-click
the fill-handle to copy the formula down for as many pipes as you have
in that run. (The fill-handle is the small black square in the bottom
right corner of the cursor).

Obviously, you may need to adjust references to C and D to suit your
sheet layout.

Hope this helps.

Pete

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
use =countif to generate returns from more than one column petess Excel Discussion (Misc queries) 7 April 3rd 06 04:03 PM
Automatic enter that returns you to column A in Excel btaft Excel Discussion (Misc queries) 2 March 9th 06 07:44 PM
Return SEARCHED Column Number of Numeric Label and Value Sam via OfficeKB.com Excel Worksheet Functions 23 January 30th 06 06:16 PM
Return Count for LAST NonBlank Cell in each Row Sam via OfficeKB.com Excel Worksheet Functions 12 April 17th 05 10:36 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"