PC Review


Reply
Thread Tools Rate Thread

auto fill cells with text if value of one cell meets specificcondition

 
 
amanda
Guest
Posts: n/a
 
      11th Nov 2009
I would like to write a macro that populates rows with different text
whose value depends upon one cell value.

For example if cell A1 = "163", then cell B1 = "BLUE' AND cell C1 =
"$2.95" AND cell D1 = "tennis ball"

Thanks for any feed back!!
 
Reply With Quote
 
 
 
 
Matthew Herbert
Guest
Posts: n/a
 
      11th Nov 2009
Amanda,

Have you looked at using the VLOOKUP function? If your data (i.e. the id
number, color, price, and type) is in a table, then simply use VLOOKUP. So,
you would have a VLOOKUP function in cells B1, C1, and D1. The lookup value
would reference A1, the table array would be wherever your table data is
located, the column index would correspond to the appropriate table column of
the data you want returned (where column 1 has the same type of data as in
cell A1, i.e. the id number), and the range lookup is TRUE for a close match
and FALSE for an exact match.

Best,

Matthew Herbert

"amanda" wrote:

> I would like to write a macro that populates rows with different text
> whose value depends upon one cell value.
>
> For example if cell A1 = "163", then cell B1 = "BLUE' AND cell C1 =
> "$2.95" AND cell D1 = "tennis ball"
>
> Thanks for any feed back!!
> .
>

 
Reply With Quote
 
Gord Dibben
Guest
Posts: n/a
 
      11th Nov 2009
Do you specifically need a macro?

VLOOKUP worksheet function would do as well.


Gord Dibben MS Excel MVP

On Wed, 11 Nov 2009 12:16:52 -0800 (PST), amanda <(E-Mail Removed)>
wrote:

>I would like to write a macro that populates rows with different text
>whose value depends upon one cell value.
>
>For example if cell A1 = "163", then cell B1 = "BLUE' AND cell C1 =
>"$2.95" AND cell D1 = "tennis ball"
>
>Thanks for any feed back!!


 
Reply With Quote
 
amanda
Guest
Posts: n/a
 
      13th Nov 2009
On Nov 11, 3:08*pm, Matthew Herbert
<MatthewHerb...@discussions.microsoft.com> wrote:
> Amanda,
>
> Have you looked at using the VLOOKUP function? *If your data (i.e. the id
> number, color, price, and type) is in a table, then simply use VLOOKUP. *So,
> you would have a VLOOKUP function in cells B1, C1, and D1. *The lookup value
> would reference A1, the table array would be wherever your table data is
> located, the column index would correspond to the appropriate table column of
> the data you want returned (where column 1 has the same type of data as in
> cell A1, i.e. the id number), and the range lookup is TRUE for a close match
> and FALSE for an exact match.
>
> Best,
>
> Matthew Herbert
>
>
>
> "amanda" wrote:
> > I would like to write a macro that populates rows with different text
> > whose value depends upon one cell value.

>
> > For example if cell A1 = "163", *then cell B1 = "BLUE' AND cell C1 =
> > "$2.95" AND cell D1 = "tennis ball"

>
> > Thanks for any feed back!!
> > .- Hide quoted text -

>
> - Show quoted text -


Hi Matthew. This worked great. Thank you very much for your help!!
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto fill Cells with text Robzz Microsoft Excel Worksheet Functions 2 11th May 2010 05:36 PM
Calculate (Auto Fill) cells with numbers and text. Bobby Atkinson Microsoft Excel Misc 3 27th Jul 2008 03:09 PM
Cell Auto Fill from Range of Cells Robert Martin Microsoft Excel Programming 0 29th Jan 2008 03:06 PM
Auto fill multiple cells depending on single cell value henrat Microsoft Excel Worksheet Functions 2 28th Nov 2005 04:59 AM
How to auto-fill text based on text in another cell =?Utf-8?B?SmFzb24=?= Microsoft Excel Misc 3 16th Feb 2005 08:40 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:01 PM.