Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default Find then GoTo problem code

I need some help with this.
In $O$1 I have a calculated Julian Date ( 1 through 365) ( defined as
"Julian")
There is a button under it so that when clicked it will take me to the
matching Julian Date on the sheet (defined as "JulianDates")
I have tried several things on my own without success, so I searched through
some of the previous posts and copied some of the macros from there and
edited them to what I thought I needed. I did not get a toothless budgie (
suck seed)
Keep in mind, I am very, very new at macros and am just learning by creating
sheets that simplify the every day use of them. These are not "make or break"
important spreadsheets (also saved as versions), so that I can try out new
stuff without compromising any important data.
This code I got from Tom Ogilvy for an earlier problem I had, works the best
so far, but still gives me an error at rng.Value

Worksheets("Weekly").Range("JulianDates").GoTo
rng.Value

I've also tried things with the Hlookup, since my Range to find is
horizontally
Any ideas??
Grateful for any help.




Sub TakeMeThere()
Dim myFind As Integer
Dim rng As Range
myFind = Worksheets("Weekly").Range("$O$1").Value
Set rng = Worksheets("Weekly").Range( _
"JulianDates").Find(myFind, _
LookIn:=xlValues, LookAt:=xlWhole)



If Not rng Is Nothing Then

Worksheets("Weekly").Range("JulianDates").GoTo
rng.Value

Else
MsgBox myFind & " was not found"
End If

End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 137
Default Find then GoTo problem code

Hi

Why don't you take a look at this path, where there is the solution ...

http://groups.google.com/group/micro...5481ab96 d4be

HTH
Cheers
Carim

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default Find then GoTo problem code

Thank You chianzen, that was the missing link.
Also thank you Carim for your link. Even though I do not have a problem
calculating the Julian dates, that showed me other ways of getting the same
result,
which I'm sure I will try out in the near future.
Thank you all for your help.

"Carim" wrote:

Hi

Why don't you take a look at this path, where there is the solution ...

http://groups.google.com/group/micro...5481ab96 d4be

HTH
Cheers
Carim


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Find then GoTo problem code


Not sure how to explain, but here goes. I am getting some barcoding
software to track the shipmaent of some products. When I receive the
products they come with an Excel speadsheet that contains information
about the person(s) they are going to. Each product will have a Barcode
with a number imbedded in it that is already present in the Excel
Spreadsheet. I'm looking for a way for the number in the barcode to
find it's matching barcode in the Excel spreadsheet and populate in a
determined cell on the same row.

Example

798556 Mr. John Doe 3200 Phillip Lake Dr. Northport AL 35406
798556


The first number "798856" is already present. The second "798556" has
been scanned and inputted. I need the second one, when scanned to find
it's match and populate a cell on the same row. Is this possible to do
in Excel?

ANy help would be great!

Thanks!
:) :) :) :) :) :) :) :) :)


--
adamkane
------------------------------------------------------------------------
adamkane's Profile: http://www.excelforum.com/member.php...o&userid=29750
View this thread: http://www.excelforum.com/showthread...hreadid=494574

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 139
Default Find then GoTo problem code

ufo_pilot:

Worksheets("Weekly").Range("JulianDates").GoTo
rng.Value


try,

Application.Goto rng, True


--
天行健,君*以自強不息
地勢坤,君*以厚德載物

http://www.vba.com.tw/plog/


"ufo_pilot" wrote:

I need some help with this.
In $O$1 I have a calculated Julian Date ( 1 through 365) ( defined as
"Julian")
There is a button under it so that when clicked it will take me to the
matching Julian Date on the sheet (defined as "JulianDates")
I have tried several things on my own without success, so I searched through
some of the previous posts and copied some of the macros from there and
edited them to what I thought I needed. I did not get a toothless budgie (
suck seed)
Keep in mind, I am very, very new at macros and am just learning by creating
sheets that simplify the every day use of them. These are not "make or break"
important spreadsheets (also saved as versions), so that I can try out new
stuff without compromising any important data.
This code I got from Tom Ogilvy for an earlier problem I had, works the best
so far, but still gives me an error at rng.Value

Worksheets("Weekly").Range("JulianDates").GoTo
rng.Value

I've also tried things with the Hlookup, since my Range to find is
horizontally
Any ideas??
Grateful for any help.




Sub TakeMeThere()
Dim myFind As Integer
Dim rng As Range
myFind = Worksheets("Weekly").Range("$O$1").Value
Set rng = Worksheets("Weekly").Range( _
"JulianDates").Find(myFind, _
LookIn:=xlValues, LookAt:=xlWhole)



If Not rng Is Nothing Then

Worksheets("Weekly").Range("JulianDates").GoTo
rng.Value

Else
MsgBox myFind & " was not found"
End If

End Sub



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
Go to goto - FIND Teddy-B Excel Discussion (Misc queries) 1 October 15th 09 05:46 PM
On error from Find, GoTo E jlclyde Excel Discussion (Misc queries) 1 October 8th 08 08:03 PM
Goto code Bob Excel Discussion (Misc queries) 4 July 6th 06 05:44 PM
Can't Seem to find problem with this VBA Code Kevin Baker[_2_] Excel Programming 12 May 7th 05 02:04 AM
Goto Command in Code JimPNicholls Excel Programming 2 September 1st 04 12:38 PM


All times are GMT +1. The time now is 08:16 AM.

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"