Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
joe joe is offline
external usenet poster
 
Posts: 2
Default Newbie help...VBA w/ Excel

Hi Everybody:

I'm a newbie to the whole VBA thing so I was wondering if
somebody could point me towards the right direction for
this. Basically what I want to do is in a Excel
worksheet I want to check if Column B in page 2 has the
word "True" in it. if it does, I want to copy the whole
row. It doesn't seem hard but i'm not too familar w/
VBA. Could someone help me get started?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Newbie help...VBA w/ Excel

Turn on the macro recorder and name your macro.
Select your range of data.
Turn on AutoFilter
Filter on column B for True
Copy
Select your target sheet
Paste.

Then use Tools Macros Visual Basic Editor.

In Module 1 you can find the code generated. There are
ways to loop through the records looking for True, but
they are generally a lot less efficient than the
AutoFilter.

-----Original Message-----
Hi Everybody:

I'm a newbie to the whole VBA thing so I was wondering if
somebody could point me towards the right direction for
this. Basically what I want to do is in a Excel
worksheet I want to check if Column B in page 2 has the
word "True" in it. if it does, I want to copy the whole
row. It doesn't seem hard but i'm not too familar w/
VBA. Could someone help me get started?


.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 280
Default Newbie help...VBA w/ Excel

A good place to start understand VBA would be to record some macros while
you use Excel to do what you describe, then look at the code. I'd suggest
that you record the process in parts to keep the code comparatively simple
and easier to understand. Try to keep the recording to one specific task
and avoid a lot of unnecessary selecting and clicking around in the
workbook. Re-record macros that don't work out. Delete or overwrite ones
that are no good. Once you understand the code associated with individual
tasks, you'll be better prepared to understand or build the whole. Record
finding True in column B of sheet 2, then stop the recording. Record copying
a row, then stop the recording. Look at the results. To find the code, from
Excel press, Alt+F8 (Or go to Tools Macro Macros), pick the macro you
recorded. Click Edit.

If you have the VBA help files installed, you can place you cursor on most
keywords in the code, press F1, and Help will open to the article pertaining
to the keyword. If you don't have the VBA help files on your computer, and
intend to do much VBA, I suggest that you get them. The are always (I think)
on the Office CD but are not usually part of the default Office
installation.

--
Bob Kilmer


"Joe" wrote in message
...
Hi Everybody:

I'm a newbie to the whole VBA thing so I was wondering if
somebody could point me towards the right direction for
this. Basically what I want to do is in a Excel
worksheet I want to check if Column B in page 2 has the
word "True" in it. if it does, I want to copy the whole
row. It doesn't seem hard but i'm not too familar w/
VBA. Could someone help me get started?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 280
Default Newbie help...VBA w/ Excel

Using Find on a selected column (or other range of cells) is another
effective alternative to literally looping through each cell or record.

--
Bob Kilmer


"Joe" wrote in message
...
Turn on the macro recorder and name your macro.
Select your range of data.
Turn on AutoFilter
Filter on column B for True
Copy
Select your target sheet
Paste.

Then use Tools Macros Visual Basic Editor.

In Module 1 you can find the code generated. There are
ways to loop through the records looking for True, but
they are generally a lot less efficient than the
AutoFilter.

-----Original Message-----
Hi Everybody:

I'm a newbie to the whole VBA thing so I was wondering if
somebody could point me towards the right direction for
this. Basically what I want to do is in a Excel
worksheet I want to check if Column B in page 2 has the
word "True" in it. if it does, I want to copy the whole
row. It doesn't seem hard but i'm not too familar w/
VBA. Could someone help me get started?


.



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
frustrated excel newbie TJ Excel Worksheet Functions 2 May 28th 10 02:53 PM
Real Newbie newbie question Dave New Users to Excel 0 January 10th 07 07:55 PM
help for an excel newbie gingertips Excel Worksheet Functions 2 January 30th 06 06:55 PM
Please help an Excel Newbie! Mustangman New Users to Excel 1 December 27th 05 03:15 AM
Excel 97 Tutorials for VBA Newbie russw Excel Programming 5 July 24th 03 04:32 PM


All times are GMT +1. The time now is 08:45 AM.

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"