Vlookup Help

tomehta

New Member
Joined
May 20, 2020
Messages
25
Office Version
  1. 2016
Platform
  1. Windows
Hello
In attached excel screen shots, in Col I (sheet 1), I want Col C value (from sheet 2), similarly in Col P (sheet 1) want Col D value( from Sheet 2). I am trying with variations of Columns function but not able to crack. I want to create formula in col B sheet 1 and drag it. I dont want to manually update formula in Col I and Col P ( and hence forth). Any help will be greatly appreciated.
 

Attachments

  • Sheet 1.png
    Sheet 1.png
    34 KB · Views: 14
  • Sheet 2.png
    Sheet 2.png
    18 KB · Views: 14
  • dragged formula in sheet 1 cols.png
    dragged formula in sheet 1 cols.png
    32.5 KB · Views: 13
Thanks for pointing it out..this will be wrong ..

basically I am skipping 6 columns from AppView reference sheet, but at the same time I am dragging in alternate columns in variance columns. Any pointer will be greatly appreciated.
 
Upvote 0

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Something like below is the requirement, any suggestion would be of great help

1590185733099.png
 
Upvote 0
I hadn't realised exactly what you meant before, the proverbial penny has dropped now, enter the first formula into B2, the second into C2, then select both cells and drag right as a pair.

=INDEX(AppView!$E2:$DN2,,COLUMNS($B2:B2)*8-8+1) - INDEX(AppView!$I2:$DN2,,COLUMNS($B2:B2)*8-8+1)
=INDEX(AppView!$F2:$DN2,,COLUMNS($C2:C2)*8-8+1) - INDEX(AppView!$J2:$DN2,,COLUMNS($C2:C2)*8-8+1)
 
Upvote 0
Change 8-8 to 4-4 in both parts of the formula.

Because you're dragging the formulas as a pair the increase needs to be halved, I forgot to allow for this.
 
Upvote 0
Something is missing sir..



1590257562823.png


1590257629430.png



--
Another issue is
After dragging for some cols, its started giving Ref error. Thats the case with what ever steps I choose...

1590257874000.png
 

Attachments

  • 1590257854686.png
    1590257854686.png
    37.3 KB · Views: 2
Upvote 0
I miscounted the number of columns, easily done when working with screen captures.

Going back, it looks like your initial effort of using 3.5 was correct, you just needed the paired formula method to make it work.

If you remember what I said about the irregular pattern when you drag a fraction / decimal. That is normally the case, but by dragging in pairs it will even itself out (3.5 in each formula still totals to 7).

For future questions / posts, please use XL2BB (see link below) to post your samples so that we can copy them to excel and test formulas before posting them.

 
Upvote 0
Thanks for quick response, 3.5 was working fine till but after some cells it started giving error. I checked the columns its calculated correctly and reference sheet has data corresponding to columns reference.

Another issue is
After dragging for some cols, its started giving Ref error. Thats the case with what ever steps I choose...

I was getting the impression since I used 3.5 , excel is messing it up. but its case even we use 4 or 8.

1590260837243.png


Reference Excel,
1590260934319.png



Regarding XLBB, I am using office 365 and seems my organization has'nt installed XLBB add in. I will dig more.

1590260731672.png
 
Upvote 0
well I spoke to early.

Cell Formulas
RangeFormula
AD1:AJ1AD1=AB1+7
AD2,AF2,AH2,AJ2AD2=CONCAT(TEXT(AD1, "MMM-DD")," BAU VAR")
AE2,AG2,AI2AE2=CONCAT(TEXT(AE1,"MMM-DD")," Project VAR")
AD3:AD7,AF3:AF7,AH3:AH7,AJ3:AJ7AD3=INDEX(AppView!$E2:$DN2,,COLUMNS($E2:AG2)*3.5-3.5+1) - INDEX(AppView!$I2:$DN2,,COLUMNS($I2:AK2)*3.5-3.5+1)
AE3:AE7,AG3:AG7,AI3:AI7AE3=INDEX(AppView!$F2:$DN2,,COLUMNS($F2:AH2)*3.5-3.5+1) - INDEX(AppView!$J2:$DN2,,COLUMNS($J2:AL2)*3.5-3.5+1)
AD9,AH9,AF9AD9=COLUMNS($E2:AG2)*3.5-3.5+1
 
Upvote 0
Second part of your formula is causing the error,

=INDEX($E2:$DN2,,COLUMNS($B2:B2)*3.5-3.5+1)-INDEX($I2:$DN2,,COLUMNS($I2:AO2)*3.5-3.5+1)

BAU Actl Aug-14 is going to be in $DQ12 which is outside of the range that you used in the formula

Enter the first one in B2, the second in C2, then select and drag as a pair. Do not change anything

=INDEX(2:2,,COLUMNS($B2:B2)*3.5-3.5+5)-INDEX(2:2,,COLUMNS($B2:B2)*3.5-3.5+9)
=INDEX(2:2,,COLUMNS($C2:C2)*3.5-3.5+6)-INDEX(2:2,,COLUMNS($C2:C2)*3.5-3.5+10)
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,688
Members
448,978
Latest member
rrauni

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