473,396 Members | 1,755 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

I'm trying to move this Excel spreadsheet to Access (complex!)

56
I have made a spreadsheet that will calculate the distance from a set of addresses to a specified postcode in Excel. I'm looking to move this to Access so I can start thinking about hooking it up to a webpage. The main problem is the fact that I don't have a CLUE how to perform the lookup in Access. Basically we have 3 sheets. 1) where you enter your postcode and radius to search by, 2) a list of suppliers, their addresses and postcodes ... with a formula next to each address to calculate a) distance and b) whether it is within the radius, 3) a list of UK postcodes, their co-ordinates etc.

What happens is you put in the postcode and the formula updates the distance from postcodes column using:

Expand|Select|Wrap|Line Numbers
  1. =SQRT(((ABS(VLOOKUP(TRIM(LEFT(InsertCustomerPostcode!$B$3,LEN(InsertCustomerPostcode!$B$3)-3)),'uk-postcodes'!$A$2:$C$2831,2, FALSE) -VLOOKUP(TRIM(LEFT(Suppliers!B2774,LEN(Suppliers!B2774)-3)),'uk-postcodes'!$A$2:$C$2831,2,FALSE)))^2)+((ABS(VLOOKUP(TRIM(LEFT(InsertCustomerPostcode!$B$3,LEN(InsertCustomerPostcode!$B$3)-3)),'uk-postcodes'!$A$2:$C$2831,3,FALSE)-VLOOKUP(TRIM(LEFT(Suppliers!B2774,LEN(Suppliers!B2774)-3)),'uk-postcodes'!$A$2:$C$2831,3, FALSE)))^2))/1609
which is referring to the co-ordinates.

This is all driven by a form which then displays in a box, in order, what addresses are within the radius.

This is all fine in excel, but I haven't got a clue about transferring this to Access. I can imput all the data as tables but its the entire performing the distance search and displaying the results that I just can't fathom. I don't know where to start.

Can anyone point me in the right direction. And if you need any more info, just let me know.

Thanks.
Jun 11 '07 #1
3 1789
NeoPa
32,556 Expert Mod 16PB
I have made a spreadsheet that will calculate the distance from a set of addresses to a specified postcode in Excel. I'm looking to move this to Access so I can start thinking about hooking it up to a webpage. The main problem is the fact that I don't have a CLUE how to perform the lookup in Access. Basically we have 3 sheets. 1) where you enter your postcode and radius to search by, 2) a list of suppliers, their addresses and postcodes ... with a formula next to each address to calculate a) distance and b) whether it is within the radius, 3) a list of UK postcodes, their co-ordinates etc.

What happens is you put in the postcode and the formula updates the distance from postcodes column using:

Expand|Select|Wrap|Line Numbers
  1. =SQRT(((ABS(VLOOKUP(TRIM(LEFT(InsertCustomerPostcode!$B$3,LEN(InsertCustomerPostcode!$B$3)-3)),'uk-postcodes'!$A$2:$C$2831,2, FALSE) -VLOOKUP(TRIM(LEFT(Suppliers!B2774,LEN(Suppliers!B2774)-3)),'uk-postcodes'!$A$2:$C$2831,2,FALSE)))^2)+((ABS(VLOOKUP(TRIM(LEFT(InsertCustomerPostcode!$B$3,LEN(InsertCustomerPostcode!$B$3)-3)),'uk-postcodes'!$A$2:$C$2831,3,FALSE)-VLOOKUP(TRIM(LEFT(Suppliers!B2774,LEN(Suppliers!B2774)-3)),'uk-postcodes'!$A$2:$C$2831,3, FALSE)))^2))/1609
which is referring to the co-ordinates.

This is all driven by a form which then displays in a box, in order, what addresses are within the radius.

This is all fine in excel, but I haven't got a clue about transferring this to Access. I can imput all the data as tables but its the entire performing the distance search and displaying the results that I just can't fathom. I don't know where to start.

Can anyone point me in the right direction. And if you need any more info, just let me know.

Thanks.
Start off by creating tables to match the VLookup data sheets. Each column in the table should be matched by a named field in the new table. The first column should be the Primary Key (or PK).
I presume, as you created the spreadsheet, you can reproduce the nuts and bolts of the formula later, it's just the VLookup bit that you need help with.
Access is actually a lot better suited to that sort of thing, but obviously as you are unfamiliar with it it would be harder for you.
Jun 11 '07 #2
Widge
56
So split the formula down into each component and try and piece it together again?

Thanks, I will give this a go!
Jun 12 '07 #3
NeoPa
32,556 Expert Mod 16PB
If you can show the MetaData of the new tables we can help with the lookup parts.
Here is an example of how to post table MetaData :
Table Name=tblStudent
Expand|Select|Wrap|Line Numbers
  1. Field; Type; IndexInfo
  2. StudentID; Autonumber; PK
  3. Family; String; FK
  4. Name; String
  5. University; String; FK
  6. Mark; Numeric
  7. LastAttendance; Date/Time
Jun 12 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: Allison Bailey | last post by:
Hi Folks, I'm a brand new Python programmer, so please point me in the right direction if this is not the best forum for this question.... I would like to open an existing MS Excel spreadsheet...
1
by: Ellen Manning | last post by:
I'm trying to export an Excel2K spreadsheet to A2K. Here is a sample of the Excel spreadsheet: LastName FirstName Hours Location HoursPercent Doe John ...
4
by: phong.lee | last post by:
Here is an issue i've been trying to figure out which i do not have an answer to. Basically i have an excel spreadsheet which has data that i copy and paste from another resource. I also created...
1
by: Johnny Meredith | last post by:
Dear All, I have an Access database that tracks the progress of income tax audits. When the taxing authorities make a change (an "Adjustment"), I record the pertinent information in the...
6
by: syvman | last post by:
Hi everyone... I am pulling my hair out trying to do this, and was wondering if someone could give me some assistance... I have an Excel spreadsheet containing several worksheets. I'd like to be...
6
by: Syvman | last post by:
Here's what I've got: I'm trying to grab some data out of an Excel spreadsheet and bring it into Access. I'm able to do it, but only if the Excel spreadsheet is not opened by any other users. I...
6
by: jalmar | last post by:
Hello again: My second question is: I am linking an excel spreadsheet into Access, I have it linked and at first had problems getting the information imported into Access-it wasn't importing-I...
2
by: p.numminen | last post by:
How I convert an Excel spreadsheet into an Access database? This is Office 2003.
3
by: D.Stone | last post by:
I'm trying to import an Excel spreadsheet into an existing Access table using Office 2003. Ultimately, the plan is to do it programmatically using TransferSpreadsheet, but to check that the file...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.