Using Vlookup/If to extract values from one named cell in a big data spread sheet

jonnalang

New Member
Joined
Jul 10, 2019
Messages
4
Hi,

I am wondering how I can easily extract wanted data from a spread sheet that is connected to a SQL-database sorting values in random order.

Lets say the data is sorted like his: (as you can see, they are not sorted with same intervals all the time)

1 A E
2 Savings 55
3 Credit 22
4 Loan 10
5 Savings 52
6 Credit 20
7 Loan 9
8 Savings 70
9 Loan 12
10 Credit 15
11 Loan 15
12 Credit 10
13 Savings 40

I have tried Vlookup, Hloopup, Matc and If, also combining them. I am currently trying to build a macro in VBA...

How could I address this problem?

Kind Regards
Engineering student


EDIT:
https://www.dropbox.com/s/qaky7ti299....data.PNG?dl=0

This is an example of how it could look
icon_smile.gif
 
Last edited by a moderator:

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Hi. Address what problem? What is it you want?

Hi Steve,

I want to get a data point located at Row L that corresponds to one column name located at Row E in a large spreadsheet. When I first get one value corresponding to a specific name in the same column, I need it to search for the next value corresponding to the same specific name in the next random row it is found.

I have tried using ROWS to extract row number, then using INDEX and IF to get the value for that column. But since the data wasn't in an sorted order, that was not possible.
 
Upvote 0
You want to look for a value in column E and then return the corresponding value in column L? Where is this value to search for?
 
Upvote 0
Put the value to search for in A1:

=IFERROR(INDEX($L$1:$L$100,SMALL(IF($E$1:$E$100=$A$1,ROW($L$1:$L$100)),ROWS($A$1:A1)-ROW($A$1)+1)),"")

Enter this CTRL-SHIFT-ENTER not just ENTER. Drag down until you see blank entries. Adjust length of ranges in red to suit data.
 
Upvote 0
My bad, I meant to search for a value (column L) corresponding to a specific name (column E) in the same row.

8/1-B-1 H, which is the name (in column E), on row 2 (where the table starts), have a corresponding value at column L. This value has to be extracted and then proceed to next row with the same name, 8/1-B-1 H, and extract that value.
 
Upvote 0
That doesnt correspond to your example in the opening post and nor does it correspond to the example in your dropbox file. I didnt bring my crystal ball with me today :)
 
Upvote 0
It's just two examples with the same problem; to extract a value corresponding to a name for every row containing that name :P Sorry if I am being unclear...
 
Upvote 0
Thats what i have given you. You need to make adjustments to suit your data. I cant really do that while the goalposts keep moving.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,169
Members
453,021
Latest member
Justyna P

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