Computing.Net > Forums > Office Software > searchd result 2 display price Exce

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

searchd result 2 display price Exce

Reply to Message Icon

Name: garfield
Date: November 26, 2007 at 21:06:54 Pacific
OS: Win XP
CPU/Ram: intel
Comment:

If i have four columns in excel: speed no,model,description, unit price

How can i make a simple tool such that when I searched for specific model or speed no, the result will display the unit amout instead.
I don't know any vba only the basics.

thanks.



Sponsored Link
Ads by Google

Response Number 1
Name: DerbyDad03
Date: November 27, 2007 at 10:44:31 Pacific
Reply:

If you are willing to settle for 2 data entry points, one for Speed No and one for Model, VLOOKUP() would be pretty simple

Let's say your data is set up as follows:

A1:A25 - Speed No
B1:B25 - Model
C1:C25 - Description
D1:D25 - Unit Price

In E1 enter the text "Speed No"
Leave E2 empty
In E3 enter =VLOOKUP(E2,A1:D25,4,FALSE)

When you enter a Speed No in E2, E3 will show the Unit Price.

In F1 enter the text "Model"
Leave F2 empty
In F3 enter =VLOOKUP(F2,B1:D25,3,FALSE)

When you enter a Model in F2, F3 will show the Unit Price.


0

Response Number 2
Name: DerbyDad03
Date: November 27, 2007 at 14:59:00 Pacific
Reply:

And here's some simple code that will return the price if you enter a Speed No or a Model.

It assumes your data is set up the same as described in my earlier post.

There's no error checking or fancy features..it's just to show you what could be done.

Sub ShowPrice()
MyThing = Application.InputBox("Enter Speed No or Model")
With Worksheets(1).Range("A1:B25")
Set c = .Find(MyThing, lookat:=xlWhole, LookIn:=xlValues)
If Not c Is Nothing Then
If c.Column = 1 Then _
MsgBox c.Offset(0, 3) _
Else MsgBox c.Offset(0, 2)
End If
End With
End Sub


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Office Software Forum Home


Sponsored links

Ads by Google


Results for: searchd result 2 display price Exce

converting my time on a timecard www.computing.net/answers/office/converting-my-time-on-a-timecard/9599.html

excel timer function www.computing.net/answers/office/excel-timer-function/91.html

Outlook 2003 Searches www.computing.net/answers/office/outlook-2003-searches/5830.html