Look up

Saviour198

New Member
Joined
Oct 20, 2024
Messages
3
Office Version
  1. Prefer Not To Say
I have customer lists; customer name, location, remarks and type of coffee they prefer. I want a formula which when I am preparing a delivery list and I type the customer name it should return their location, remarks and type of coffee they prefer on a roll.
1000084855.png
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
So let's say your current customer name is in cell G2
in H2 write formula:
Excel Formula:
=vlookup(G,$A$2:$G$100,COLUMN(B1),0)
copy this formula right (and if needed - down)
adjust $G$100 to your real loast cell (may be with few extra white cells for growning database situation.

BTW. Knowing Excel version could lead to more elegant solution (anyway this is not very bad I think)
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

If you have one of the newer version you could use
Excel Formula:
=xlookup(g2,a$2:a$100,b$2:d$100)
 
Upvote 0
Here is a VBA solution :

Paste in the WorkSheet leverl module :

VBA Code:
Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
Dim R As Range
  'Do nothing if more than one cell is selected
  If Target.Count > 1 Then Exit Sub
  'Is C15 selected?
  If Intersect(Target, Range("G2")) Is Nothing Then Exit Sub
  'Search option range for value from G1
  Set R = Range("CustName").Columns(1).Find(Range("G2"), LookAt:=xlWhole)
  'Found?
  If R Is Nothing Then
    MsgBox "Not found"
  Else
    'Show the value
    MsgBox "LOCATION : " & R.Offset(0, 1) & vbCrLf & vbCrLf & "REMARKS : " & R.Offset(0, 2) & vbCrLf & vbCrLf & "COFFEE : " & R.Offset(0, 3)
  End If
End Sub

I utilized cell G2 for Customer Name entry :
 

Attachments

  • Coffee.jpg
    Coffee.jpg
    36.5 KB · Views: 3
Upvote 0
So let's say your current customer name is in cell G2
in H2 write formula:
Excel Formula:
=vlookup(G,$A$2:$G$100,COLUMN(B1),0)
copy this formula right (and if needed - down)
adjust $G$100 to your real loast cell (may be with few extra white cells for growning database situation.

BTW. Knowing Excel version could lead to more elegant solution (anyway this is not very bad I think)
 
Upvote 0

Forum statistics

Threads
1,222,905
Messages
6,168,949
Members
452,227
Latest member
sam1121

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top