Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-15-2012, 10:21 AM
pattyr pattyr is offline Help with VLOOKUP formula Windows XP Help with VLOOKUP formula Office 2007
Novice
Help with VLOOKUP formula
 
Join Date: Feb 2012
Posts: 3
pattyr is on a distinguished road
Default Help with VLOOKUP formula

I am trying to insert the contents of a column from Sheet2 (VBAP in the attached) into Sheet1 (E1P). E1P may have multiples of the values in VBAP; I want the contents of the inserted column to repeat if there a mulitple values/occurrences. Right now, using the basic VLOOKUP, only the first occurrence of the 'wanted' value is returned.
Attached Files
File Type: xlsx VLookup_Example_08152012.xlsx (9.8 KB, 22 views)
Reply With Quote
  #2  
Old 08-16-2012, 08:49 AM
Gary Drumm Gary Drumm is offline Help with VLOOKUP formula Windows XP Help with VLOOKUP formula Office 2007
Advanced Beginner
 
Join Date: Mar 2012
Posts: 86
Gary Drumm is on a distinguished road
Default

=VLOOKUP($A6,VBAP!$A$1:$C$33,3,FALSE)

I'm not sure if I understand what you need.

I tried this, but it didn't do anything different.
Reply With Quote
  #3  
Old 08-16-2012, 12:35 PM
pattyr pattyr is offline Help with VLOOKUP formula Windows XP Help with VLOOKUP formula Office 2007
Novice
Help with VLOOKUP formula
 
Join Date: Feb 2012
Posts: 3
pattyr is on a distinguished road
Default

Exactly my problem - I need something - match, lookup, index, that will look at the value in one sheet, see multiples of that value in the second sheet and return the associated value in the lookup/return column, repeatedly...
Reply With Quote
  #4  
Old 08-17-2012, 12:15 AM
Kevin@Radstock Kevin@Radstock is offline Help with VLOOKUP formula Windows 7 32bit Help with VLOOKUP formula Office 2010 32bit
Office 365
 
Join Date: Feb 2012
Posts: 94
Kevin@Radstock is on a distinguished road
Default

Not sure what you mean, this will give you a count of the values! Need some clarification on what you are trying to achieve!

=IF(COUNTIF($A$1:A2,$A2)=1,VLOOKUP($A2,VBAP!$A:$C, 3,FALSE)*COUNTIF($A$2:$A$34,$A2),"")
Reply With Quote
  #5  
Old 08-17-2012, 04:31 AM
pattyr pattyr is offline Help with VLOOKUP formula Windows XP Help with VLOOKUP formula Office 2007
Novice
Help with VLOOKUP formula
 
Join Date: Feb 2012
Posts: 3
pattyr is on a distinguished road
Default

what I need to happen is this: lookup the value in E1P, cell A2, from the list of values in VBAP, A1:A33, then return the exact value from C1:C33 into the E1P table, column 2. What happens now, with the basic vlookup is that the first instance of the 'found' value in VBAP A1:A33 is being returned for each instance. I need the unique values from VBAP c2:c33 to be returned. column C in the E1P tables show what I need returned, but column b is what is being returned.
Reply With Quote
  #6  
Old 08-20-2012, 02:17 AM
Venky62 Venky62 is offline Help with VLOOKUP formula Windows 7 64bit Help with VLOOKUP formula Office 2010 32bit
Advanced Beginner
 
Join Date: Jul 2012
Posts: 58
Venky62 is on a distinguished road
Default

I have tried to build a formula that should give you the desired result. To explain the logic of what I have done:
1. Created an additional column called count in both the source (VBAP) and destination(E1P) sheets. The formula in all the cells of the Count column in the VBAP sheet gives the occurence number of the value in the "Sales Document" column. Occurrence number means whether it is the first occurence, second occurrence and so on of the "Sales Document" value in the sheet.

2. The formula in the Count column of the E1P sheet is more complicated. It checks to see if the "Document Head" value in E1P sheet exists in the "Sales Document" column of VBAP or not. If not, it returns 0. If the value exists, it counts the total number of occurrences of that value in VBAP sheet, and assigns the occurrence number to each value in the E1P sheet until it reaches the maximum number of occurrences in the VBAP sheet, and then starts from 1 again. E.g. if 13427653 occurs twice in VBAP, and occurs 4 times in E1P, the formula assigns occurrence number 1 to first occurrence, 2 to second occurrence, 1 to third occurrence, and 2 fourth occurrence.
3. The formula in Item column of E1P is a basic Index and Match formula that matches the values in the 2 columns of E1P with two columns of VBAP and returns the value from the Item column when there is a match.

I am attaching the file with the formulas.
Attached Files
File Type: xlsx 2VLookup_Example_08152012.xlsx (13.8 KB, 16 views)
Reply With Quote
  #7  
Old 08-20-2012, 02:20 AM
Venky62 Venky62 is offline Help with VLOOKUP formula Windows 7 64bit Help with VLOOKUP formula Office 2010 32bit
Advanced Beginner
 
Join Date: Jul 2012
Posts: 58
Venky62 is on a distinguished road
Default

The Index and Match formula in the Item column of the E1P sheet is an array formula, so after you paste it in the formula files, press Ctrl+Shift+Enter. Once you have entered the formula in once cell, you can drag it down to the rest of the cells.
Reply With Quote
Reply

Tags
vlookup



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with VLOOKUP formula Using IF and VLOOKUP together Becki Excel 2 04-06-2012 05:32 PM
something like VLOOKUP hanvyj Excel 4 03-13-2012 09:03 AM
Help with VLOOKUP formula Vlookup ibrahimaa Excel 5 03-04-2012 11:24 AM
Vlookup Karen615 Excel 4 09-12-2011 02:30 PM
Help with VLOOKUP sakhtar Excel 2 07-24-2010 07:39 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:21 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft