Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 159
Default value input on 1 ws, find on another, put date in

Hello

Setting up a wkbk for other users. The user will type in a value on 1 ws. I want the macro to find this value in another ws, then, in that ws, select this cell: col A, row wherever-the-value-was-found.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 536
Default value input on 1 ws, find on another, put date in

On Sunday, August 26, 2012 3:34:02 AM UTC-7, robzrob wrote:
Hello



Setting up a wkbk for other users. The user will type in a value on 1 ws. I want the macro to find this value in another ws, then, in that ws, select this cell: col A, row wherever-the-value-was-found.



Thanks


Hi Rob,
Give this a try, it may get you started.

Whe
Data is a named range in sheet 2.
Range("D1") is on sheet 1 (can be a drop down list)

Sub DateInCell()
Dim Data As Range
Dim i As Integer
i = Sheets("Sheet1").Range("D1").Value

Sheets("Sheet2").Select
Range("Data").Select
Cells.Find(What:=i, After:=ActiveCell, _
LookIn:=xlFormulas, LookAt:= _
xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False _
, SearchFormat:=False).Activate
ActiveCell.Offset(0, 1) = Date

Range("A1").Select
End Sub

I'm pretty sure you can also use a Selection Change event macro so that all you have to do is enter the number in a designated cell on sheet 1.

Hope this help.
Regards,
Howard
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 159
Default value input on 1 ws, find on another, put date in

On Sunday, 26 August 2012 20:35:35 UTC+1, Howard wrote:
On Sunday, August 26, 2012 3:34:02 AM UTC-7, robzrob wrote:

Hello








Setting up a wkbk for other users. The user will type in a value on 1 ws. I want the macro to find this value in another ws, then, in that ws, select this cell: col A, row wherever-the-value-was-found.








Thanks




Hi Rob,

Give this a try, it may get you started.



Whe

Data is a named range in sheet 2.

Range("D1") is on sheet 1 (can be a drop down list)



Sub DateInCell()

Dim Data As Range

Dim i As Integer

i = Sheets("Sheet1").Range("D1").Value



Sheets("Sheet2").Select

Range("Data").Select

Cells.Find(What:=i, After:=ActiveCell, _

LookIn:=xlFormulas, LookAt:= _

xlWhole, SearchOrder:=xlByRows, _

SearchDirection:=xlNext, _

MatchCase:=False _

, SearchFormat:=False).Activate

ActiveCell.Offset(0, 1) = Date



Range("A1").Select

End Sub



I'm pretty sure you can also use a Selection Change event macro so that all you have to do is enter the number in a designated cell on sheet 1.



Hope this help.

Regards,

Howard




Thanks, will give it a go. That Selection Change sounds useful too.
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
Input box to find date Tom Excel Discussion (Misc queries) 4 June 1st 10 01:24 AM
Input box to find date Tom Excel Programming 0 May 29th 10 08:10 AM
input box for a date -- how to make an enter key the current date by default JasonK[_3_] Excel Programming 2 July 18th 09 03:40 PM
input a date or update it based on date in another cell Doug P New Users to Excel 1 July 18th 07 11:25 PM
find user input BorisS Excel Programming 4 July 19th 06 06:29 AM


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