Select range of cells using VBA

swati29

New Member
Joined
Feb 10, 2015
Messages
1
Hi All,

I am looking to select range of cells in excel 2007 using VBA macros based on the cell value .for eg:

Based on cell value (3 or 2) select the rows (shown with red color font)
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Cell Value
[/TD]
[TD]a
[/TD]
[TD]b
[/TD]
[TD]c
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]0
[/TD]
[TD]0
[/TD]
[TD]0
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]1
[/TD]
[TD]0
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]1
[/TD]
[TD]1
[/TD]
[TD]1
[/TD]
[/TR]
</tbody>[/TABLE]
Kindly help!

Thanks,
Swati
 
Hi Swati

Welcome to the Forum

Few questions,
- does the value in first column decides the number of cells to be selected in that row?
- what is that you intend to do after selecting the cells?
 
Upvote 0

Forum statistics

Threads
1,226,837
Messages
6,193,254
Members
453,784
Latest member
Chandni

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top