Sub tests()

Application.ScreenUpdating = False
Application.DisplayAlerts = False
Application.Calculation = xlCalculationManual

Sheets("New").UsedRange.Borders.LineStyle =
Excel.XlLineStyle.xlLineStyleNone

Dim i As Long
For i = 2 To Sheets("New").Range("a65356").End(xlUp).Row
    If Sheets("New").Range("a" & i).Value <> Sheets("New").Range("a" & i +
1).Value Then
        With Sheets("New").Range("a" & i & ":h" & i).Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
        End With

    End If
Next


Application.ScreenUpdating = True
Application.DisplayAlerts = True
Application.Calculation = xlCalculationAutomatic


End Sub



On Wed, Sep 12, 2012 at 6:39 PM, Vabz <in.vaib...@gmail.com> wrote:

> Hi
>
> I guess i am late but thought of responding..
>
> You can put conditional formatting in cells which you want to underline..
>
> Sample file is attached..
>
> Cheers..
>
> Rgds//Vabz
>
> On Friday, August 31, 2012 2:21:50 AM UTC+5:30, CAN wrote:
>>
>> I have list that goes from column A to colum H
>>
>> on column H it list the subtotals based on dates ranges.  Every time
>> there is a change of dates,  column H shows the subtotal of amount (Column
>> E).  The sheet realizes that the next row will start a new date and it
>> computes a subtotal on cell H and last row for that particular date.
>>
>> What I need is a macro that will look at column H, and every time it
>> finds a value (other than "blank") it will draw a line from column A to
>> column H  as shown on the sample below. The line has to be located on the
>> row that shows the last date entry before the date changes to a new day
>>
>>     08/07/12 ANT0306 114.00  000056527149      08/07/12 ANT0110 114.00
>>  000208854552      08/07/12 ANT0105 114.00  0000000xxxxx      08/07/12
>> ANT0132 109.00  000053745845     * 08/07/12* *ANT0280* *109.00* *
>>  000053745846* *      560.00*   08/08/12 ANT0207 114.00  000000001752
>>  *08/08/12* *ANT0013* *114.00* * 000000001123* *      280.00*
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> I have attached a sample list on Excel, so it shows the list and the
>> cells with the subtotals.  In the sample several rows on column H shows a
>> subtotal,  the the list could have hundreds of rows, so it needs to loop
>> until there are no more values on column A
>>
>> As always,  Thank you very much for all the help
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>  --
> Join official facebook page of this forum @
> https://www.facebook.com/discussexcel
>
> FORUM RULES (1120+ 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.
>
> 6) Jobs posting is not allowed.
>
> 7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed.
>
> NOTE : Don't ever post personal or confidential data in a workbook. Forum
> owners and members are not responsible for any loss.
> ---
> You received this message because you are subscribed to the Google Groups
> "MS EXCEL AND VBA MACROS" group.
> To post to this group, send email to excel-macros@googlegroups.com.
> To unsubscribe from this group, send email to
> excel-macros+unsubscr...@googlegroups.com.
>
>
>



-- 
*Regards*
* *
*Ashish Koul*


*Visit*
*http://www.excelvbamacros.com/*
*http://www.accessvbamacros.com/*

P Before printing, think about the environment.

-- 
Join official facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES (1120+ 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. 

6) Jobs posting is not allowed.

7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed.

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To post to this group, send email to excel-macros@googlegroups.com.
To unsubscribe from this group, send email to 
excel-macros+unsubscr...@googlegroups.com.


Reply via email to