$$Excel-Macros$$ Test to see if cell value starts with a D

2012-03-28 Thread Preston Moore

This a probably a simple question, but I am new to VBA...
How do I test to find cells that contain text starting with the letter D?
Thank you
Pres  

-- 
FORUM RULES (986+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

--
To post to this group, send email to excel-macros@googlegroups.com


$$Excel-Macros$$ Looping-stopping to process when cell starts with a D

2011-03-18 Thread Preston Moore
I am just starting to use VBA so I am a neophyte.  I have data that shows units 
sold by product listed by store for over 40 stores.  Each store has its own ID 
code and they all start with the letter D.  When I encounter each new store I 
want to copy and past the units sold of each product to a pre-formatted 
spreadsheet.  I think I want to do this by looping using the FOR EACH-NEXT 
construct.  My question is:  how do I write an instruction that says stop and 
evaluate the data (for copying  pasting) each time a new store code is 
encountered?  I think I need to write something to the effect that whenever a 
line starts with a D to stop and process?  How would I go about doing this?  
Thanks.


 NOTICE: This email message is for the sole use of the intended recipient(s) 
and may contain confidential and privileged information. Any unauthorized 
review, use, disclosure or distribution is prohibited. If you are not the 
intended recipient, please contact the sender by reply email and destroy all 
copies of the original message.


-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com


Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel


RE: $$Excel-Macros$$ While Looping, looking for cells that start with D

2011-03-18 Thread Preston Moore

Hi Dave,
Thank you for your response.  Sounds like your suggestion should work just fine.
Best regards,
Preston
 


From: davebonall...@hotmail.com
To: excel-macros@googlegroups.com
Subject: RE: $$Excel-Macros$$ While Looping, looking for cells that start with 
D
Date: Fri, 18 Mar 2011 18:00:38 +0800




Hi,
You can use an IF combined with LEFT, something like:
IF Left(A2,1)=D Then (your process code here)
Regards - Dave.
 
 Date: Thu, 17 Mar 2011 11:39:35 -0700
 Subject: $$Excel-Macros$$ While Looping, looking for cells that start with D
 From: walpa...@hotmail.com
 To: excel-macros@googlegroups.com
 
 I am just starting to use VBA so I am a neophyte. I have data that
 shows units sold by product listed by store for over 40 stores. Each
 store has its own ID code and they all start with the letter D.
 When I encounter each new store I want to copy and past the units sold
 of each product to a pre-formatted spreadsheet. I think I want to do
 this by looping using the FOR EACH-NEXT construct. My question is:
 how do I write an instruction that says stop and evaluate the data
 (for copying  pasting) each time a new store code is encountered? I
 think I need to write something to the effect that whenever a line
 starts with a D to stop and process? How would I go about doing
 this? Thanks.
 Preston
 
 -- 
 --
 Some important links for excel users:
 1. Follow us on TWITTER for tips tricks and links : 
 http://twitter.com/exceldailytip
 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
 3. Excel tutorials at http://www.excel-macros.blogspot.com
 4. Learn VBA Macros at http://www.quickvba.blogspot.com
 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
 To post to this group, send email to excel-macros@googlegroups.com
 
 
 Like our page on facebook , Just follow below link
 http://www.facebook.com/discussexcel

-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com

To post to this group, send email to excel-macros@googlegroups.com
 

Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel
  

-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com


Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel