Name selection should populate other cells

ipbr21054

Well-known Member
Joined
Nov 16, 2010
Messages
5,726
Office Version
  1. 2007
Platform
  1. Windows
Evening.
My information is on the worksheet called INFO
On the INFO worksheet we have the following,
Names in column CV
Address in column CX
Paid in column CZ
Mileage in column DB
Current range on the INFO worksheet is CV2:DB16
Overtime this range will increase down the page.


I have a worksheet called GRASS INCOME & this is where the magic should happen.
I would enter the date in the next available cell & in this case it would be A29
I currently have drop down lists in each cell but looking for a better approach to populate each cell.
So i select the customers name from the drop down list in cell B29
Now what i would like is for the following cells to populate automatically by using the information on my INFO sheet.
Like so,
ADDRESS C29
PAID D29
MILEAGE E29

So i would type TOM JONE & i would then see 123 ANY STREET £50.00 6
This would then continue down the page so next input would be row A30

Thanks very much
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

Excel 2010
ABCDE
1DateNameAddressPaidMileage
27/13/2019Brown3 Main30070
GRASS INCOME
Cell Formulas
RangeFormula
C2=VLOOKUP($B2,Sheet7!$CV$2:$DB$9,3,FALSE)
D2=VLOOKUP($B2,Sheet7!$CV$2:$DB$9,5,FALSE)
E2=VLOOKUP($B2,Sheet7!$CV$2:$DB$9,7,FALSE)
 
Upvote 0
Change the sheet7 to your sheet name (e.g., INFO). Also, modify the date format and the currency symbol as needed.

You'll need to change the 9 in the formula to a large'ish number to cover eventually adding more names.
Alternatively, you can calculate the last row, but then the formula will involved INDIRECT, if you don't care.

Code:
=VLOOKUP($B2,INDIRECT("Sheet7!$CV$2:$DB$"&COUNTA(Sheet7!$CV:$CV)),3,FALSE)
 
Last edited:
Upvote 0
Hi,
Now applied and working thanks.

Tomorrow i will need to look into altering the code so that cells that do not have a customer yet selected does not then show #N/A in column C,D & E

Also in cell D42 i also see #N/A
I have this formula in the cell =SUM(D5:D41)

Also in cell E42 ia lso see #N/A
I have this formula in the cell =SUM(E5:E41)

I assume once the above cells do not show #N/A then cell D42 & E42 will show the total in figures correctly

Thanks
 
Upvote 0
You can always wrap around an iferror:

Code:
=IFERROR(VLOOKUP($B2,INDIRECT("Sheet7!$CV$2:$DB$"&COUNTA(Sheet7!$CV:$CV)),3,FALSE),"")

You never explained what's in D or E columns.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,711
Messages
6,174,025
Members
452,542
Latest member
Bricklin

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