You're welcome Dave
From: walpa...@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 15:55:08 -0600 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 -- ---------------------------------------------------------------------------------- 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