Enter 4 digit code - Excel find folder with code on P: drive and paste folder name into cell

fegis

New Member
Joined
Dec 5, 2023
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi all my first post!


I have Office 365 and would like to create an autofill code please. Not sure if this is possible.

I would like to enter a 4 digit code into A4, have excel take that code, check the folders in the P:\ (network drive) Copy the corresponding folder that contains the 4 digit code then paste it into A5. eg:

VBA Code:
User enters to A4 = 8818

Excel finds:

P:\8818 123-125 made up address, Melbourne

Excel to fill in 

A5 = 123-125 made up address, Melbourne

Many thanks in advance!
Fegis
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
sorry had a think, can i please change the output to the full folder name, no need to drop off the input. eg:

VBA Code:
User enters to A4 = 8818

Excel finds:

P:\8818 123-125 made up address, Melbourne

Excel to fill in

A5 = 8818 123-125 made up address, Melbourne

Thank you
 
Upvote 0

Forum statistics

Threads
1,223,250
Messages
6,171,036
Members
452,374
Latest member
keccles

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