Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default Excel Code Samples

Good morning All

Where can I find guidance and code samples to help me perform the following
tasks using Excel VBA
1. iterate through a worksheet cell by cell
2. replace values, parse values and conditionally set flags in mew columns

Thanks in advance

Habib


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel Code Samples

John Walkenbach's site
http://www.j-walk.com/ss/excel
go to the developers section

Chip Pearson's site
http://www.cpearson.com/excel/topics.htm


to loop through all cells

for each cell in Activesheet.UsedRange
if cell.value = 10 then
msgbox cell.Address(0,0)
end if
Next


for each sh in Activeworkbook.Worksheets
for each cell in sh.UsedRange
if cell.value = 10 then
msgbox cell.Address(0,0,xlA1,True)
end if
Next
Next

--
Regards,
Tom Ogilvy




"HSalim[MVP]" wrote in message
...
Good morning All

Where can I find guidance and code samples to help me perform the

following
tasks using Excel VBA
1. iterate through a worksheet cell by cell
2. replace values, parse values and conditionally set flags in mew columns

Thanks in advance

Habib




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel Code Samples

for a good example of finding information on a worksheet, see the help
example in the VBA for the FINDNEXT method of the range object.

Excel also has a macro recorder which is good for getting some insights in
to the code to use. It produces bad code because it records your actions
like selecting cells and moving around the sheet, but it is good for showing
the properties and methods and some of the arguments.

You can always post here with specific questions.

Debra Dalgleish's site has some good information for major topics like pivot
tables, conditional formatting, data validation and Filters and some others.
http://www.contextures.com then go to tech tips.

--
Regards,
Tom Ogilvy


"Tom Ogilvy" wrote in message
...
John Walkenbach's site
http://www.j-walk.com/ss/excel
go to the developers section

Chip Pearson's site
http://www.cpearson.com/excel/topics.htm


to loop through all cells

for each cell in Activesheet.UsedRange
if cell.value = 10 then
msgbox cell.Address(0,0)
end if
Next


for each sh in Activeworkbook.Worksheets
for each cell in sh.UsedRange
if cell.value = 10 then
msgbox cell.Address(0,0,xlA1,True)
end if
Next
Next

--
Regards,
Tom Ogilvy




"HSalim[MVP]" wrote in message
...
Good morning All

Where can I find guidance and code samples to help me perform the

following
tasks using Excel VBA
1. iterate through a worksheet cell by cell
2. replace values, parse values and conditionally set flags in mew

columns

Thanks in advance

Habib






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default Excel Code Samples

Tom,
Thanks for the links. I was able to achieve what I wanted.

Regards
Habib

"Tom Ogilvy" wrote in message
...
: for a good example of finding information on a worksheet, see the help
: example in the VBA for the FINDNEXT method of the range object.
:
: Excel also has a macro recorder which is good for getting some insights in
: to the code to use. It produces bad code because it records your actions
: like selecting cells and moving around the sheet, but it is good for
showing
: the properties and methods and some of the arguments.
:
: You can always post here with specific questions.
:
: Debra Dalgleish's site has some good information for major topics like
pivot
: tables, conditional formatting, data validation and Filters and some
others.
: http://www.contextures.com then go to tech tips.
:
: --
: Regards,
: Tom Ogilvy
:
:
: "Tom Ogilvy" wrote in message
: ...
: John Walkenbach's site
: http://www.j-walk.com/ss/excel
: go to the developers section
:
: Chip Pearson's site
: http://www.cpearson.com/excel/topics.htm
:
:
: to loop through all cells
:
: for each cell in Activesheet.UsedRange
: if cell.value = 10 then
: msgbox cell.Address(0,0)
: end if
: Next
:
:
: for each sh in Activeworkbook.Worksheets
: for each cell in sh.UsedRange
: if cell.value = 10 then
: msgbox cell.Address(0,0,xlA1,True)
: end if
: Next
: Next
:
: --
: Regards,
: Tom Ogilvy
:
:
:
:
: "HSalim[MVP]" wrote in message
: ...
: Good morning All
:
: Where can I find guidance and code samples to help me perform the
: following
: tasks using Excel VBA
: 1. iterate through a worksheet cell by cell
: 2. replace values, parse values and conditionally set flags in mew
: columns
:
: Thanks in advance
:
: Habib
:
:
:
:
:
:


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
excel dynamic charts samples kh Charts and Charting in Excel 4 May 13th 08 07:24 PM
samples of sales dashboards in excel harlow.28 Excel Discussion (Misc queries) 1 June 6th 07 05:24 AM
improve help samples in excel 2003 Mac B Excel Discussion (Misc queries) 3 October 20th 06 06:22 PM
Excel TIPS&TRICKS and Samples marko Excel Discussion (Misc queries) 4 November 30th 05 07:22 PM
XmlMapQuery and XmlDataQuery Samples in Excel 2003 and VB.NET Jalal[_2_] Excel Programming 0 April 8th 05 08:03 PM


All times are GMT +1. The time now is 03:30 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"