Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Starting with command

Dear all

Is it possible to write an if statement which is
a "starting with command".

For example if cell (r,1) begins "SAM" then
range(A1:d1").select
with selction
Font.bold
end slection

I would want it to pick up a range of data for example

SAM 1
SAM 2
But Not
FAM 1

MAny thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Starting with command

Hi
try something like

.....
dim r
dim rng as range
r=1
with activesheet
if left(.cells(r,1).value,3)="SAM" then
..range("A1:D1").font.bold=True
end if
end with
.....



-----Original Message-----
Dear all

Is it possible to write an if statement which is
a "starting with command".

For example if cell (r,1) begins "SAM" then
range(A1:d1").select
with selction
Font.bold
end slection

I would want it to pick up a range of data for example

SAM 1
SAM 2
But Not
FAM 1

MAny thanks
.

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
Starting and Stopping excel from command line. Bruce Edwards Excel Discussion (Misc queries) 1 April 27th 08 06:34 PM
Pivot Table Error Message - "Command Text not set for command obje Jeff Divian Excel Discussion (Misc queries) 0 November 7th 07 10:26 PM
starting an external program with a command line Jonathan[_5_] Excel Programming 0 September 5th 03 02:29 PM
starting an external program with a command line Jonathan[_5_] Excel Programming 0 September 5th 03 02:20 PM
Starting a userform upon starting the file Fritznel Excel Programming 1 July 28th 03 05:37 AM


All times are GMT +1. The time now is 10:34 PM.

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

About Us

"It's about Microsoft Excel"