Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default batch editing a document

does anyone know how to bold a document on alternate lines? for example if i
have 10 lines, and i want the odd number lines batch bolded while even
numbers remain the same, is there a formula i can use in either word or
excel? any help or idea would be appreciated?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default batch editing a document

Sub boldit()
Set r = ActiveSheet.UsedRange
nLastRow = r.Rows.Count + r.Row - 1
For i = 1 To nLastRow Step 2
Cells(i, 1).EntireRow.Font.Bold = True
Next
End Sub
--
Gary''s Student - gsnu200785
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default batch editing a document

Hi,

You can do this without VBA by using conditional formatting. Assuming you
are using 2003 or earlier this would do it:

1. Select the range you want formatted.
2. Choose Format, Conditional Formatting
3. From the first drop down choose Formula is
4. In the next box enter =MOD(ROW(),2)
5. Click the Format button and on the Font tab choose Bold (or whatever)

The above formula bolds all Odd numbered rows, to do Even numbered rows use
=MOD(ROW(),2)=0

In 2007:
1. Select the range
2. Choose Home, Conditional Formatting, New Rule
3. Choose Use a formula to determine which cell to format
4. In the Format values where this formula is true box enter the same
formulas as above
5. Click the Format button and on the Font tab choose Bold (or whatever)


Cheers,
Shane Devenshire
Microsoft Excel MVP

"shem" wrote in message
...
does anyone know how to bold a document on alternate lines? for example if
i
have 10 lines, and i want the odd number lines batch bolded while even
numbers remain the same, is there a formula i can use in either word or
excel? any help or idea would be appreciated?


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default batch editing a document

Adding to Shane's suggestion.

=MOD(SUBTOTAL(3,$A1:$A$2),2)=0

Will survive filtering while the =MOD(ROW(),2) will not.


Gord Dibben MS Excel MVP

On Sun, 11 May 2008 08:02:35 -0700, "Shane Devenshire"
wrote:

Hi,

You can do this without VBA by using conditional formatting. Assuming you
are using 2003 or earlier this would do it:

1. Select the range you want formatted.
2. Choose Format, Conditional Formatting
3. From the first drop down choose Formula is
4. In the next box enter =MOD(ROW(),2)
5. Click the Format button and on the Font tab choose Bold (or whatever)

The above formula bolds all Odd numbered rows, to do Even numbered rows use
=MOD(ROW(),2)=0

In 2007:
1. Select the range
2. Choose Home, Conditional Formatting, New Rule
3. Choose Use a formula to determine which cell to format
4. In the Format values where this formula is true box enter the same
formulas as above
5. Click the Format button and on the Font tab choose Bold (or whatever)


Cheers,
Shane Devenshire
Microsoft Excel MVP

"shem" wrote in message
...
does anyone know how to bold a document on alternate lines? for example if
i
have 10 lines, and i want the odd number lines batch bolded while even
numbers remain the same, is there a formula i can use in either word or
excel? any help or idea would be appreciated?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Editing a shared document that has some read-only capabiities asmchi Excel Discussion (Misc queries) 0 December 8th 09 05:12 PM
The document is locked for editing by another user davehunter64 Excel Discussion (Misc queries) 1 June 24th 08 01:18 PM
Excel document locked for editing? Kristin_Wade Excel Discussion (Misc queries) 0 August 31st 06 05:50 PM
Editing Word Document within Excel [email protected] Excel Programming 4 July 7th 06 09:21 PM
excel document locked for editing krish Setting up and Configuration of Excel 3 November 16th 05 08:17 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"