guernica52

New Member
Joined
May 3, 2016
Messages
4
Hi Guys,

I have a keyword data dump that has 2 of every keyword (one has data for desktops, one has data for smartphones)

I would like to write a vlookup formula that will first check if the keyword is "desktop". If so, pull the corresponding rank (which would skip over the smartphone rows).

I actually wrote this formula a while ago (lost it now) and it just combined a simple vlookup and if statement. Any help with this formula below would be really appreciated.

client facing tab
KEYWORDGOOGLE DESKTOP RANKGOOGLE MOBILE RANK
shoes[if shoes lines up with "desktop", pull the corresponding google rank][if shoes lines up with "smartphone", pull the corresponding google rank
mens shoes""""

<tbody>
</tbody>

raw data tab
KEYWORDDEVICEGOOGLE RANK
shoesdesktop5
shoessmartphone3
mens shoesdesktop8
mens shoessmartphone9

<tbody>
</tbody>
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Hi,

How about a SUMPRODUCT formula:


Excel 2010
ABC
1KEYWORDDEVICEGOOGLE RANK
2shoesdesktop5
3shoessmartphone3
4mens shoesdesktop8
5mens shoessmartphone9
raw data


Excel 2010
ABC
1KEYWORDGOOGLE DESKTOP RANKGOOGLE MOBILE RANK
2shoes53
3mens shoes89
client facing
Cell Formulas
RangeFormula
B2=SUMPRODUCT(('raw data'!$A$2:$A$5=$A2)*('raw data'!$B$2:$B$5="desktop")*'raw data'!$C$2:$C$5)
C2=SUMPRODUCT(('raw data'!$A$2:$A$5=$A2)*('raw data'!$B$2:$B$5="smartphone")*'raw data'!$C$2:$C$5)

Formulas copied down.
 
Upvote 0
Thank you!

I also need to pull in the ranking URL as well, so this formula wouldn't work for for that.

Is there another formula that would also work for this (see below)? Is the if statement + vlookup combo still an option?


client facing tab
KEYWORDGOOGLE DESKTOP RANKGOOGLE MOBILE RANK
shoes[if shoes lines up with "desktop", pull the corresponding google url][if shoes lines up with "smartphone", pull the corresponding google url]
mens shoes""""

<tbody>
</tbody>


raw data tab
KEYWORDDEVICEGOOGLE RANK
shoesdesktop/shoes
shoessmartphone/shoes-all
mens shoesdesktop/shoes-for-men
mens shoessmartphone/shoes-for-men-2

<tbody>
</tbody>
 
Upvote 0
*headers fixed

Thank you!


I also need to pull in the ranking URL as well, so this formula wouldn't work for for that.

Is there another formula that would also work for this (see below)? Is the if statement + vlookup combo still an option?


client facing tab
KEYWORDGOOGLE DESKTOP URLGOOGLE MOBILE URL
shoes[if shoes lines up with "desktop", pull the corresponding google url][if shoes lines up with "smartphone", pull the corresponding google url]
mens shoes""""

<tbody>
</tbody>



raw data tab
KEYWORDDEVICEGOOGLE URL
shoesdesktop/shoes
shoessmartphone/shoes-all
mens shoesdesktop/shoes-for-men
mens shoessmartphone/shoes-for-men-2

<tbody>
</tbody>

 
Upvote 0
This should work for your latest query:


Excel 2010
EFG
1KEYWORDDEVICEGOOGLE RANK
2shoesdesktop/shoes
3shoessmartphone/shoes-all
4mens shoesdesktop/shoes-for-men
5mens shoessmartphone/shoes-for-men-2
raw data



Excel 2010
EFG
1KEYWORDGOOGLE DESKTOP RANKGOOGLE MOBILE RANK
2shoes/shoes/shoes-all
3mens shoes/shoes-for-men/shoes-for-men-2
client facing
Cell Formulas
RangeFormula
F2{=INDEX('raw data'!E$2:G$5,MATCH(1,('raw data'!E$2:E$5=E2)*('raw data'!F$2:F$5="desktop"),0),3)}
G2{=INDEX('raw data'!E$2:G$5,MATCH(1,('raw data'!E$2:E$5=E2)*('raw data'!F$2:F$5="smartphone"),0),3)}
Press CTRL+SHIFT+ENTER to enter array formulas.


PLEASE NOTE: These are Array Formulas, HOLD DOWN Control and Shift, then press Enter.
F2 Formula copied down.
G2 Formula copied down.
 
Upvote 0

Forum statistics

Threads
1,214,642
Messages
6,120,698
Members
448,979
Latest member
DET4492

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