Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default If it is in any of these...

Hi,

I want my excel macro to search through the columns on a given row and if a
cell equals any of a set of values then make variablex that column.

So check Row 1 to see if any column has a value in this set: rate, level,
average.

If so make that column = variablex

I have most of it figured out. Really don't know how to create/use a set (or
something similar) in VBA.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default If it is in any of these...

Do you want each cell in the column to equal variablex? column = variblex is
illegal.

"hfazal" wrote:

Hi,

I want my excel macro to search through the columns on a given row and if a
cell equals any of a set of values then make variablex that column.

So check Row 1 to see if any column has a value in this set: rate, level,
average.

If so make that column = variablex

I have most of it figured out. Really don't know how to create/use a set (or
something similar) in VBA.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default If it is in any of these...

No, the macro is searching the column headers to find the right column.
However I want to use it on different files and each file has the "right"
column labelled differently. I just want to be able to find the right column
# and the right column being the one that has value a, b, c, d or e.

"JLGWhiz" wrote:

Do you want each cell in the column to equal variablex? column = variblex is
illegal.

"hfazal" wrote:

Hi,

I want my excel macro to search through the columns on a given row and if a
cell equals any of a set of values then make variablex that column.

So check Row 1 to see if any column has a value in this set: rate, level,
average.

If so make that column = variablex

I have most of it figured out. Really don't know how to create/use a set (or
something similar) in VBA.

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 03:23 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"