#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default Macroprogramming

Hi,

I looking for a macro that should do the following procedu

Show all cell with a certain content, for example show cells with value
"cheese" and cells with value "eggs", do not show zeroes, empty and other
cell values.

The macro should do the procedure within a certain cellrange for example
f3:f54.

Filtering is not possible due to users lack of excelexperience and that I´m
working in excel 2003.

Thanks

Stefan Carlsson
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Macroprogramming

You cna use the macro below to select a list of words and then select a range
of cell and the macro willl color the cells green

Sub SelectCells()

Set wordList = Application.InputBox( _
prompt:="Select WordList", _
Title:="Get Words", Type:=8)

Set MyRange = Application.InputBox( _
prompt:="Select Range", _
Title:="Get Range", Type:=8)


For Each cell In MyRange
For Each word In wordList
If InStr(cell.Value, word) 0 Then
cell.Interior.ColorIndex = 4
Exit For
End If

Next word

Next cell




"Stefan" wrote:

Hi,

I looking for a macro that should do the following procedu

Show all cell with a certain content, for example show cells with value
"cheese" and cells with value "eggs", do not show zeroes, empty and other
cell values.

The macro should do the procedure within a certain cellrange for example
f3:f54.

Filtering is not possible due to users lack of excelexperience and that I´m
working in excel 2003.

Thanks

Stefan Carlsson

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default Macroprogramming

Thanks Joel, I will try that solution.

Clarification:

In the excelsheet I will have a couple of buttons each button will execute a
certain procedure.

Button 1
Will show: cells with value for example 1, 4 and 5 excluding zeroes, empty
cells and all other values.
Button 2
Will show: cells with value 1, 3 and 7 excluding zeroes, empty cells and all
other values.

The range will be from example f3:f34

"Joel" wrote:

You cna use the macro below to select a list of words and then select a range
of cell and the macro willl color the cells green

Sub SelectCells()

Set wordList = Application.InputBox( _
prompt:="Select WordList", _
Title:="Get Words", Type:=8)

Set MyRange = Application.InputBox( _
prompt:="Select Range", _
Title:="Get Range", Type:=8)


For Each cell In MyRange
For Each word In wordList
If InStr(cell.Value, word) 0 Then
cell.Interior.ColorIndex = 4
Exit For
End If

Next word

Next cell




"Stefan" wrote:

Hi,

I looking for a macro that should do the following procedu

Show all cell with a certain content, for example show cells with value
"cheese" and cells with value "eggs", do not show zeroes, empty and other
cell values.

The macro should do the procedure within a certain cellrange for example
f3:f54.

Filtering is not possible due to users lack of excelexperience and that I´m
working in excel 2003.

Thanks

Stefan Carlsson

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



All times are GMT +1. The time now is 01:56 AM.

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"