ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel Query (https://www.excelbanter.com/excel-programming/311643-excel-query.html)

Steved[_3_]

Excel Query
 
Hello from Steved

I have 3 columns the 3rd columns is Kilometres
I would like to a Query to get Kilometres
How would I go about this please.

City Depot To Exmouth 5.9
To Exmouth Mairangi Bay 11.0
ASB Ponsonby Britomart Centre 1.5
Auckland Browns Bay 20.0
Auckland Newmarket 2.0
Auckland Three Kings 5.4
Avondale Symonds St 14.4
Avondale Symonds Street 11.2
Thankyou.


DavidC[_2_]

Excel Query
 
Presumably you want to find the kilometres from City
centre to say Brown's Bay? (Only 2 kilometres from
Auckland to Newmarket?)

You may need to first set the table up as a pivot table
then use the intersect command to find km.

This intersect code is from the Excel VBA help file.

Worksheets("Sheet1").Activate
Set isect = Application.Intersect(Range("rg1"), Range
("rg2"))
If isect Is Nothing Then
MsgBox "Ranges do not intersect"
Else
isect.Select
End If

Hope this helps

Regards
DavidC

-----Original Message-----
Hello from Steved

I have 3 columns the 3rd columns is Kilometres
I would like to a Query to get Kilometres
How would I go about this please.

City Depot To Exmouth 5.9
To Exmouth Mairangi Bay 11.0
ASB Ponsonby Britomart Centre 1.5
Auckland Browns Bay 20.0
Auckland Newmarket 2.0
Auckland Three Kings 5.4
Avondale Symonds St 14.4
Avondale Symonds Street 11.2
Thankyou.

.


Steved[_3_]

Excel Query
 
Thankyou DavidC I'll give it a try.


-----Original Message-----
Presumably you want to find the kilometres from City
centre to say Brown's Bay? (Only 2 kilometres from
Auckland to Newmarket?)

You may need to first set the table up as a pivot table
then use the intersect command to find km.

This intersect code is from the Excel VBA help file.

Worksheets("Sheet1").Activate
Set isect = Application.Intersect(Range("rg1"), Range
("rg2"))
If isect Is Nothing Then
MsgBox "Ranges do not intersect"
Else
isect.Select
End If

Hope this helps

Regards
DavidC

-----Original Message-----
Hello from Steved

I have 3 columns the 3rd columns is Kilometres
I would like to a Query to get Kilometres
How would I go about this please.

City Depot To Exmouth 5.9
To Exmouth Mairangi Bay 11.0
ASB Ponsonby Britomart Centre 1.5
Auckland Browns Bay 20.0
Auckland Newmarket 2.0
Auckland Three Kings 5.4
Avondale Symonds St 14.4
Avondale Symonds Street 11.2
Thankyou.

.

.



All times are GMT +1. The time now is 07:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com