HI 

 

Try this :

 

Sub MTest()

 

    Dim Hyp As Hyperlink

    Dim rngCell As Range

    Dim wksSheet As Worksheet

    Dim strURL  As String

    Set wksSheet = Worksheets("cleaner")

    strURL =
"http://www.pawleysvacationrentals.com/PawleysIsland/VacationRentals/Pawleys
Island/Details/"

 
Range("rngRange").CurrentRegion.Columns(Range("rngRange").CurrentRegion.Colu
mns.Count).Delete

   For Each rngCell In
Range("rngRange").CurrentRegion.Columns(2).Offset(1).Cells

        If rngCell.Value = "" Then Exit Sub

        wksSheet.Hyperlinks.Add rngCell, strURL & "\" & rngCell.Offset(,
-1).Value, "", "Click", rngCell.Value

    Next rngCell

    

End Sub

 

 

Regards

Rajan verma

+91 7838100659 [IM-Gtalk]

 

From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com]
On Behalf Of charlyRoot
Sent: 29 June 2012 2:10
To: excel-macros@googlegroups.com
Subject: $$Excel-Macros$$ Convert houseName Column to Hyperlink by combining
PropID Col with Static URL Root

 


I'm trying to remove unnecessary columns from my sheet so it fits in emails
better. The last column is "Link" column. 

 


PropID

Name

BedRms

Beds

BathRms

Area

Sleeps

 Rent 

 Tax 

 Damage 

 ResFee 

Total

Link


CG10

Charlestown Grant 10

4

KQQTT

4.1

LBTS

8

 $ 4,460

 $ 446.00

 $         50

 $      40

 $ 4,996

 
<http://www.pawleysvacationrentals.com/PawleysIsland/VacationRentals/Pawleys
Island/Details/CharlestownGrant10> Link


HAS102

Hamilton 102

3

KQQS

3

LBTS

8

 $ 3,070

 $ 307.00

 $         50

 $      40

 $ 3,467

 
<http://www.pawleysvacationrentals.com/PawleysIsland/VacationRentals/Pawleys
Island/Details/Hamilton102> Link


HAS402

Hamilton 402

3

KQTT

3

LBTS

6

 $ 2,765

 $ 276.50

 $         50

 $      40

 $ 3,132

 
<http://www.pawleysvacationrentals.com/PawleysIsland/VacationRentals/Pawleys
Island/Details/Hamilton402> Link

 

The link is composed by combining a contents from "statics" sheet 

 


http://www.pawleysvacationrentals.com/PawleysIsland/VacationRentals/PawleysI
sland/Details/

 

with the PropID value in the first column to produce something like this as
a target for the link:

 


http://www.pawleysvacationrentals.com/PawleysIsland/VacationRentals/PawleysI
sland/Details/
<http://www.pawleysvacationrentals.com/PawleysIsland/VacationRentals/Pawleys
Island/Details/CG10> CG10

 

Well here is what I want to change: I want to drop the "Link" column
altogether and just turn "Name" column into links using the same combination
as before.

 

Like this:


PropID

Name

BedRms

Beds

BathRms

Area

Sleeps

 Rent 

 Tax 

 Damage 

 ResFee 

Total


CG10

Charlestown Grant 10
<http://www.pawleysvacationrentals.com/PawleysIsland/VacationRentals/Pawleys
Island/Details/CrescentD1D/> 

4

KQQTT

4.1

LBTS

8

 $ 4,460

 $ 446.00

 $         50

 $      40

 $ 4,996


HAS102

Hamilton 102
<http://www.pawleysvacationrentals.com/PawleysIsland/VacationRentals/Pawleys
Island/Details/CrescentD1D/> 

3

KQQS

3

LBTS

8

 $ 3,070

 $ 307.00

 $         50

 $      40

 $ 3,467


HAS402

Hamilton 402
<http://www.pawleysvacationrentals.com/PawleysIsland/VacationRentals/Pawleys
Island/Details/CrescentD1D/> 

3

KQTT

3

LBTS

6

 $ 2,765

 $ 276.50

 $         50

 $      40

 $ 3,132

 

Here is my code so far:

 

 

-- 
FORUM RULES (986+ members already BANNED for violation)
 
1) Use concise, accurate thread titles. Poor thread titles, like Please
Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will
not get quick attention or may not be answered.
 
2) Don't post a question in the thread of another member.
 
3) Don't post questions regarding breaking or bypassing any security
measure.
 
4) Acknowledge the responses you receive, good or bad.
 
5) Cross-promotion of, or links to, forums competitive to this forum in
signatures are prohibited. 
 
NOTE : Don't ever post personal or confidential data in a workbook. Forum
owners and members are not responsible for any loss.
 
----------------------------------------------------------------------------
--------------------------
To post to this group, send email to excel-macros@googlegroups.com
 
To unsubscribe, send a blank email to
excel-macros+unsubscr...@googlegroups.com

-- 
FORUM RULES (986+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

------------------------------------------------------------------------------------------------------
To post to this group, send email to excel-macros@googlegroups.com

To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com

Reply via email to