Formula advice

VBA learner ITG

Active Member
Joined
Apr 18, 2017
Messages
272
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Hi all,

Apologies if this has been asked before but i cannot find an answer to my question on here or on google.

I have the below formula which is a standard vlookup which returns a certain value found for A, B, C etc

=IF(VLOOKUP($A7,'CHRISTMAS GIFT SHOP'!$A:$E,3,FALSE)="A",1,IF(VLOOKUP($A7,'CHRISTMAS GIFT SHOP'!$A:$E,3,FALSE)="B",2,IF(VLOOKUP($A7,'CHRISTMAS GIFT SHOP'!$A:$E,3,FALSE)="C",3,IF(VLOOKUP($A7,'CHRISTMAS GIFT SHOP'!$A:$E,3,FALSE)="D",4))))

However, when I try and apply a wildcard to the "A" to return any value with A because the returned vaue can be A1, A2 and so on it doesnt work.

I have tried various approaches and i am stumped and need your expert advice.
 
In that case can you please explain everything that you need, as I am not willing to continue guessing what may or may not work.
 
Upvote 0

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
H VBA Learner ITG,

Do you need nested lookups so the values returned are easily changed? e.g Set up a list in G1 to H4 as below:-
A 20
B 30
C 40
D 50

then your formula could be:-

Untested -
=VLOOKUP(LEFT(VLOOKUP($A7,'CHRISTMAS GIFT SHOP'!$A:$E,3,FALSE),1),$G$1:$H$4,2,0)

This will return the value associated with the first character in column C for the store number looked up in column A.

You can then amend the values in column H as required.

Hope this helps

Eric.

Hi Eric,

Thank you for posting this. This does what I need without writing a complex formula but by adding an allocations table.
 
Upvote 0
In that case can you please explain everything that you need, as I am not willing to continue guessing what may or may not work.


Hi Fluff,

I really appreciate your help today as your formula logic has resolved another issue. I do appreciate your assistance.
 
Upvote 0
Glad it's sorted & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,194
Members
452,616
Latest member
intern444

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