Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Need Help soon on how to search through a range


I am new to VBA programming in excel outside of UserForms. I am trying
to handle the following situation and I am not sure if there is away to
do it via excel worksheet function or if I need to write a VBA block to
do it. If I do it VBA Code I am not sure how to fil the rest of column
with the function

here is the situation:
If worksheet(1).Range(D1) is in worksheet(2).Range(b:b) then i want to
check column C of that row where (d1) is located on worksheet(1) to see
if is equal to worksheet(1).range(c1)
and if it is I want to set G1 = "whatever"

does anyone have any suggestions?


--
VBAapprentice
------------------------------------------------------------------------
VBAapprentice's Profile: http://www.excelforum.com/member.php...o&userid=32465
View this thread: http://www.excelforum.com/showthread...hreadid=522487

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 770
Default Need Help soon on how to search through a range

Is another way to say what you want:

For any row in Sheet 2, if the cell in column B matches Sheet 1,cell D1, and
the cell in Column C matches the same cell in Sheet 1 then the cell in
column G should say "Whatever?"

If so then try pasting this formula into Sheet 2, G1 and copy down:

=IF(AND(B1=Sheet1!$D$1,C1=Sheet1!C1),"whatever","" )

hth,

Doug


"VBAapprentice"
wrote in message
news:VBAapprentice.24ovrm_1142389501.2228@excelfor um-nospam.com...

I am new to VBA programming in excel outside of UserForms. I am trying
to handle the following situation and I am not sure if there is away to
do it via excel worksheet function or if I need to write a VBA block to
do it. If I do it VBA Code I am not sure how to fil the rest of column
with the function

here is the situation:
If worksheet(1).Range(D1) is in worksheet(2).Range(b:b) then i want to
check column C of that row where (d1) is located on worksheet(1) to see
if is equal to worksheet(1).range(c1)
and if it is I want to set G1 = "whatever"

does anyone have any suggestions?


--
VBAapprentice
------------------------------------------------------------------------
VBAapprentice's Profile:
http://www.excelforum.com/member.php...o&userid=32465
View this thread: http://www.excelforum.com/showthread...hreadid=522487



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
Search for value in a range Student Excel Worksheet Functions 6 January 31st 08 12:46 AM
Search range for text not in another range simon howard Excel Discussion (Misc queries) 3 March 28th 07 08:44 PM
Search Range for item in seperate range [email protected][_2_] Excel Programming 6 January 9th 06 03:53 PM
Search range add value Fredg Excel Programming 4 August 26th 05 03:45 AM
How to search a range for a suburb in a large range Bogan.. Excel Programming 2 June 22nd 05 01:20 PM


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

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

About Us

"It's about Microsoft Excel"