Custom Boxes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In Lotus 123, I could have a popup box ask for specific data and when it was
entered it would go into the cells that I specified. Can Excel do too?
 
If you want a simple Search Macro try this one:

Sub SearchAndHighlight()
Dim ThisArea As Range, SearchMe As String
Sheets("Sheet1").Activate
SearchMe = InputBox("Write here what you're looking for.")
If IsEmpty(SearchMe) Then Exit Sub
Set ThisArea = Sheets("Sheet1").Cells.Find(SearchMe, lookat:=xlWhole)
If ThisArea Is Nothing Then
MsgBox SearchMe & " - " & "There is no such entry."
Else
Cells.Interior.ColorIndex = xlColorIndexNone
ThisArea.Interior.ColorIndex = 6
End If
End Sub

This opens an input box which tells you to write what you're looking for in
the worksheet, and when you press OK or Enter it highlights the found cell,
otherwise it will open up a message box telling you "There is no such entry."
I presume that you have some working knowledge with macros, otherwise tell me.

Swisse
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top