vlookup rates without table , need formula

makinmomb

Active Member
Joined
Dec 23, 2013
Messages
401
GOMA 480000 250000
KASUMBALESA 480000 250000
KITWE 420000 200000
LUBUMBASHI 480000 250000
LUSAKA 420000 200000
NDOLA 420000 200000

These is the table of rates

I need one formula two pick those rates on b1 and c1 where a1 is location
I dont need this table anywhere else , i need one formula to take
that table , some kind of multipe if lookup
 
Last edited:

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Looks like...

=VLOOKUP(A1,{"GOMA",480000,250000;"KASUMBALESA",480000,250000;"KITWE",420000,200000;"LUBUMBASHI",480000,250000;"LUSAKA",420000,200000;"NDOLA",420000,200000},2,0)

=VLOOKUP(A1,{"GOMA",480000,250000;"KASUMBALESA",480000,250000;"KITWE",420000,200000;"LUBUMBASHI",480000,250000;"LUSAKA",420000,200000;"NDOLA",420000,200000},3,0)

where A1 houses a location like KITWE.
 
Upvote 0
reads [TABLE="width: 64"]
<tbody>[TR]
[TD="class: xl63, width: 64, align: center"]#N/A[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
reads [TABLE="width: 64"]
<tbody>[TR]
[TD="class: xl63, width: 64, align: center"]#N/A[/TD]
[/TR]
</tbody>[/TABLE]

No, it wouldn't.

Let A2 = KITWE.

In B2 enter:

=VLOOKUP(A2,{"GOMA",480000,250000;"KASUMBALESA",480000,250000;"KITWE",420000,200000;"LUBUMBASHI",480000,250000;"LUSAKA",420000,200000;"NDOLA",420000,200000},2,0)

You'll get 420000.
 
Upvote 0
Works fine here. You may need to adjust argument separators for your language.
 
Upvote 0
Works fine here. You may need to adjust argument separators for your language.

That could be the issue.

Formula from Aladin just works fine for me when I use the backslash as column-separator:

=VLOOKUP(A1;{"GOMA"\480000\250000;"KASUMBALESA"\480000\250000;"KITWE"\420000\200000;"LUBUMBASHI"\480000\250000;"LUSAKA"\420000\200000;"NDOLA"\420000\200000};2;0)

To determine the current separator settings run this code:

Code:
Sub ArraySeparators()
  Dim strsep As String
    strsep = "Alternate Array Separator =" & _
    Application.International(xlAlternateArraySeparator) & vbCrLf
    strsep = strsep & "Column Separator =" & _
    Application.International(xlColumnSeparator) & vbCrLf
    strsep = strsep & "Decimal Separator =" & _
    Application.International(xlDecimalSeparator) & vbCrLf
    strsep = strsep & "List Separator =" & _
    Application.International(xlListSeparator) & vbCrLf
    strsep = strsep & "Row Separator =" & _
    Application.International(xlRowSeparator) & vbCrLf
    strsep = strsep & "Thousands Separator =" & _
    Application.International(xlThousandsSeparator) & vbCrLf
  MsgBox (strsep)
End Sub
 
Upvote 0

Excel 2010
ABCDEF
1Kitwe420000GOMA480000
2420000KASUMBALESA480000
3KITWE420000
4420000LUBUMBASHI480000
5LUSAKA420000
6NDOLA420000
9a
Cell Formulas
RangeFormula
B1=VLOOKUP(A1,E1:F6,2,0)
B2=VLOOKUP(A1,{"GOMA",480000;"KASUMBALESA",480000;"KITWE",420000;"LUBUMBASHI",480000;"LUSAKA",420000;"NDOLA",420000},2,0)
B4=OR(A1={"Goma","Kasumbalesa","Lubumbashi"})*480000+OR(A1={"Kitwe","Lusaka","Ndola"})*420000



1. Put your lookup information into a Table
2. Try the Vlookup formula see B1.
3. Copy the formula in B1 to B2.
4. Highlight the Lookup table's range such as E1:F6; press F9
B2 should yield the self-contained Vlookup for your region.
5. B4 is another approach
 
Last edited:
Upvote 0
I am using excel 2013 , anyone can guess which separator will work , i don't know how
to determine through code
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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