Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Lookup Macro

I want to create a button that you click, it asks you to enter a number and
then it is highlighted. I have never used macros before, how do you create
formulas? It must be easier than writing codes that only very technical
people understand. Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Lookup Macro

Pretty easy using conditional formatting
select the cells(s) desiredUse formatconditionalformattingformula
is=J2=$j$1

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Lindsey" wrote in message
...
I want to create a button that you click, it asks you to enter a number and
then it is highlighted. I have never used macros before, how do you create
formulas? It must be easier than writing codes that only very technical
people understand. Thanks!


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Lookup Macro

Is this a macro? and will this create a button a person can click and a
message will pop up and ask for a 6-digit number? I know how to get to the
macro program, but I don't understand how to start one. Thanks!

"Don Guillett" wrote:

Pretty easy using conditional formatting
select the cells(s) desiredUse formatconditionalformattingformula
is=J2=$j$1

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Lindsey" wrote in message
...
I want to create a button that you click, it asks you to enter a number and
then it is highlighted. I have never used macros before, how do you create
formulas? It must be easier than writing codes that only very technical
people understand. Thanks!



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Lookup Macro

Sorry, I must not be explaining this well or I don't understand. I have an
example of a Macro that I want, but I don't know how to adjust it. I just
want to change the column it looks at. Here it is:

Sub Cusip()
'
' Cusip Macro
' Macro recorded 2/21/2008 by User
'

Dim wsSheet As Worksheet
Dim rFound As Range
Dim strFind As String
Dim iRow As Integer
Dim iCol As Integer

strFind = InputBox(Prompt:="Enter CUSIP")
If strFind = "" Then Exit Sub
For Each wsSheet In ThisWorkbook.Worksheets
'wsSheet.Range("K:K").EntireColumn.Hidden = True
Set rFound = wsSheet.UsedRange. _
Find(What:=strFind, LookIn:=xlValues, LookAt:=xlPart, MatchCase:=False)
If Not rFound Is Nothing Then
Application.Goto rFound, Scroll:=True
'wsSheet.Range("K:K").EntireColumn.Hidden = False
iRow = ActiveCell.Row
'iCol = ActiveCell.Column
'Cells(iRow, 0).Select
'Range(iRow, 0).Select
Range(Selection, ActiveCell.Offset(0, -1)).Select

End
End If
'wsSheet.Range("K:K").EntireColumn.Hidden = False
Next wsSheet

MsgBox "No match"

End Sub

"Don Guillett" wrote:


No, It's simpler than that. It uses a cell. As shown if you have numbers in
j2:j??? and you put the number in j1 then all cells with that number will
highlight. Look in the help index for conditional formatting.
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Lindsey" wrote in message
...
Is this a macro? and will this create a button a person can click and a
message will pop up and ask for a 6-digit number? I know how to get to the
macro program, but I don't understand how to start one. Thanks!

"Don Guillett" wrote:

Pretty easy using conditional formatting
select the cells(s) desiredUse formatconditionalformattingformula
is=J2=$j$1

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Lindsey" wrote in message
...
I want to create a button that you click, it asks you to enter a number
and
then it is highlighted. I have never used macros before, how do you
create
formulas? It must be easier than writing codes that only very technical
people understand. Thanks!






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Lookup Macro

Your original post did NOT say that................

The macro posted here will search all worksheets until it finds the value
desiredgoto it and hilite it and the cell to the left. It is looking in the
entire worksheet. Are you saying you want to search a specific column ONLY?
If desired, send your workbook to my private address below along with a
detailed explanation of what you do want.
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Lindsey" wrote in message
...
Sorry, I must not be explaining this well or I don't understand. I have an
example of a Macro that I want, but I don't know how to adjust it. I just
want to change the column it looks at. Here it is:

Sub Cusip()
'
' Cusip Macro
' Macro recorded 2/21/2008 by User
'

Dim wsSheet As Worksheet
Dim rFound As Range
Dim strFind As String
Dim iRow As Integer
Dim iCol As Integer

strFind = InputBox(Prompt:="Enter CUSIP")
If strFind = "" Then Exit Sub
For Each wsSheet In ThisWorkbook.Worksheets
'wsSheet.Range("K:K").EntireColumn.Hidden = True
Set rFound = wsSheet.UsedRange. _
Find(What:=strFind, LookIn:=xlValues, LookAt:=xlPart, MatchCase:=False)
If Not rFound Is Nothing Then
Application.Goto rFound, Scroll:=True
'wsSheet.Range("K:K").EntireColumn.Hidden = False
iRow = ActiveCell.Row
'iCol = ActiveCell.Column
'Cells(iRow, 0).Select
'Range(iRow, 0).Select
Range(Selection, ActiveCell.Offset(0, -1)).Select

End
End If
'wsSheet.Range("K:K").EntireColumn.Hidden = False
Next wsSheet

MsgBox "No match"

End Sub

"Don Guillett" wrote:


No, It's simpler than that. It uses a cell. As shown if you have numbers
in
j2:j??? and you put the number in j1 then all cells with that number will
highlight. Look in the help index for conditional formatting.
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Lindsey" wrote in message
...
Is this a macro? and will this create a button a person can click and a
message will pop up and ask for a 6-digit number? I know how to get to
the
macro program, but I don't understand how to start one. Thanks!

"Don Guillett" wrote:

Pretty easy using conditional formatting
select the cells(s) desiredUse formatconditionalformattingformula
is=J2=$j$1

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Lindsey" wrote in message
...
I want to create a button that you click, it asks you to enter a
number
and
then it is highlighted. I have never used macros before, how do you
create
formulas? It must be easier than writing codes that only very
technical
people understand. Thanks!





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
macro Lookup DamienO Excel Worksheet Functions 3 October 23rd 09 09:44 AM
Lookup Macro Chris Excel Programming 5 April 20th 08 03:05 AM
MACRO TO LOOKUP AND SUM K[_2_] Excel Programming 3 April 18th 08 08:55 PM
Lookup macro gramps Excel Discussion (Misc queries) 3 September 14th 07 04:36 PM
lookup macro?? darkbearpooh1 Excel Worksheet Functions 9 February 22nd 06 05:56 AM


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