Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 192
Default Conditional Formatting

I have a list of products that I want to search for in my later program with
titles distinguishing the different manufacturers within the table (example
below). The manufacturers won't change any time soon and I want to make an
If Then statement that says: If selection is company A or company B etc. then
copy selection and paste in a certain cell. Because I know the
manufacturers, I was hoping to stear clear of having another list that I have
to loop through to see if Company A = Comapny A in another list or (almost
worse) have a large If Then imbedded statement that has 15 If Then's to match
the number of Companies. Any thoughts? Much thanks in advance!


Company A
Product 1
Product 2
Company B
Product 5
Product 6
etc.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 192
Default Conditional Formatting

I resorted to the following. It's longer, but easier to copy/paste than an
if/then.

Select Case curselection.Value
Case "Company1"
curselection.Copy Range("A7").Offset(i + j, 0)
Case "Company2"
curselection.Copy Range("A7").Offset(i + j, 0)
Case "Company3"
curselection.Copy Range("A7").Offset(i + j, 0)
Case "Company4"
curselection.Copy Range("A7").Offset(i + j, 0)
etc.
End Select



"StumpedAgain" wrote:

I have a list of products that I want to search for in my later program with
titles distinguishing the different manufacturers within the table (example
below). The manufacturers won't change any time soon and I want to make an
If Then statement that says: If selection is company A or company B etc. then
copy selection and paste in a certain cell. Because I know the
manufacturers, I was hoping to stear clear of having another list that I have
to loop through to see if Company A = Comapny A in another list or (almost
worse) have a large If Then imbedded statement that has 15 If Then's to match
the number of Companies. Any thoughts? Much thanks in advance!


Company A
Product 1
Product 2
Company B
Product 5
Product 6
etc.

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
Conditional formatting--different formatting depending on cell con Tammy S. Excel Discussion (Misc queries) 3 March 30th 09 08:11 PM
Formatting Conditional Formatting Icon Sets The Rook[_2_] Excel Discussion (Misc queries) 3 March 7th 09 08:48 PM
Formatting cells in a column with conditional formatting? shamor Excel Discussion (Misc queries) 8 May 19th 08 10:11 PM
Protect Cell Formatting including Conditional Formatting Mick Jennings Excel Discussion (Misc queries) 5 November 13th 07 05:32 PM
Conditional Formatting that will display conditional data BrainFart Excel Worksheet Functions 1 September 13th 05 05:45 PM


All times are GMT +1. The time now is 08:01 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"