Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default find date on other sheet

Can someone tell me how i can find a date on another sheet and if it is
found select the colorvalue two cells to the right.

Greetings Hans


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default find date on other sheet

Hi
try something like
=VLOOKUP(DATE(2004,1,1),'other_sheet'!A1:C100,3,0)

--
Regards
Frank Kabel
Frankfurt, Germany


hans wrote:
Can someone tell me how i can find a date on another sheet and if it
is found select the colorvalue two cells to the right.

Greetings Hans

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default find date on other sheet

oops sorry i need it in vba.

Greetings


"Frank Kabel" schreef in bericht
...
Hi
try something like
=VLOOKUP(DATE(2004,1,1),'other_sheet'!A1:C100,3,0)

--
Regards
Frank Kabel
Frankfurt, Germany


hans wrote:
Can someone tell me how i can find a date on another sheet and if it
is found select the colorvalue two cells to the right.

Greetings Hans



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default find date on other sheet

Hi
o.k. try
sub foo()
dim source_rng as range
dim lookup_value
dim ret_value
set source_rng = worksheets("other_sheet").range("A1:C100")
lookup_value=dateserial(2004,1,1)
ret_value=application.vlookup(lookup_value,source_ rng,2,0)
if iserror(ret_value) then
msgbox "Date not found"
else
msgbox "Found value: " & ret_value
end if
end sub


--
Regards
Frank Kabel
Frankfurt, Germany


hans wrote:
oops sorry i need it in vba.

Greetings


"Frank Kabel" schreef in bericht
...
Hi
try something like
=VLOOKUP(DATE(2004,1,1),'other_sheet'!A1:C100,3,0)

--
Regards
Frank Kabel
Frankfurt, Germany


hans wrote:
Can someone tell me how i can find a date on another sheet and if

it
is found select the colorvalue two cells to the right.

Greetings Hans


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default find date on other sheet

Hi
sorry, you wanted the cell 2 columns to the right. So use the statement
ret_value=application.vlookup(lookup_value,source_ rng,3,0)

--
Regards
Frank Kabel
Frankfurt, Germany


Frank Kabel wrote:
Hi
o.k. try
sub foo()
dim source_rng as range
dim lookup_value
dim ret_value
set source_rng = worksheets("other_sheet").range("A1:C100")
lookup_value=dateserial(2004,1,1)
ret_value=application.vlookup(lookup_value,source_ rng,2,0)
if iserror(ret_value) then
msgbox "Date not found"
else
msgbox "Found value: " & ret_value
end if
end sub



hans wrote:
oops sorry i need it in vba.

Greetings


"Frank Kabel" schreef in bericht
...
Hi
try something like
=VLOOKUP(DATE(2004,1,1),'other_sheet'!A1:C100,3,0)

--
Regards
Frank Kabel
Frankfurt, Germany


hans wrote:
Can someone tell me how i can find a date on another sheet and if
it is found select the colorvalue two cells to the right.

Greetings Hans


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
Find Specific date in Biwwekly Based on date jlclyde Excel Discussion (Misc queries) 3 January 27th 09 09:15 PM
Goto or Find a Date in a Sheet Kev - Radio Man Excel Discussion (Misc queries) 1 March 28th 08 09:40 AM
Julian date - find next highest date/number jchick0909 Excel Worksheet Functions 1 March 20th 08 11:38 PM
Macro to find matching date and copy values to another sheet Tiger Excel Discussion (Misc queries) 3 August 13th 07 01:45 PM
Find the date of the coming up Saturday given the current date. Michael Ermino Excel Worksheet Functions 4 April 11th 07 02:48 AM


All times are GMT +1. The time now is 05:43 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"