PC Review


Reply
Thread Tools Rate Thread

Assigning value to text

 
 
Robincambs
Guest
Posts: n/a
 
      22nd Sep 2008
I am looking to assign a value to a text string and then insert the
corresponding value into a cell

As follows:

A1 to A100 could equal "NO CHANGE" or "FOR CHANGE"
If A1 = "NO CHANGE" then I1 = "10" else if A1 = "FOR CHANGE" then I1 =
"20"
If A2 = "NO CHANGE" then I2 = "10" else if A2 = "FOR CHANGE" then I2 =
"20"

then this to loop until A100

any help will be gratefully received
 
Reply With Quote
 
 
 
 
Rick Rothstein
Guest
Posts: n/a
 
      22nd Sep 2008
Give this a try...

=10+10*(A1="FOR CHANGE")

and copy it down as needed.

--
Rick (MVP - Excel)


"Robincambs" <(E-Mail Removed)> wrote in message
news:cf08ca94-9d6c-4e28-b423-(E-Mail Removed)...
>I am looking to assign a value to a text string and then insert the
> corresponding value into a cell
>
> As follows:
>
> A1 to A100 could equal "NO CHANGE" or "FOR CHANGE"
> If A1 = "NO CHANGE" then I1 = "10" else if A1 = "FOR CHANGE" then I1 =
> "20"
> If A2 = "NO CHANGE" then I2 = "10" else if A2 = "FOR CHANGE" then I2 =
> "20"
>
> then this to loop until A100
>
> any help will be gratefully received


 
Reply With Quote
 
Stefi
Guest
Posts: n/a
 
      22nd Sep 2008
Enter
=IF(A1="NO CHANGE",10,20)
and drag it down to A100.

Regards,
Stefi

„Robincambs” ezt *rta:

> I am looking to assign a value to a text string and then insert the
> corresponding value into a cell
>
> As follows:
>
> A1 to A100 could equal "NO CHANGE" or "FOR CHANGE"
> If A1 = "NO CHANGE" then I1 = "10" else if A1 = "FOR CHANGE" then I1 =
> "20"
> If A2 = "NO CHANGE" then I2 = "10" else if A2 = "FOR CHANGE" then I2 =
> "20"
>
> then this to loop until A100
>
> any help will be gratefully received
>

 
Reply With Quote
 
Robincambs
Guest
Posts: n/a
 
      22nd Sep 2008
On 22 Sep, 14:17, "Rick Rothstein"
<rick.newsNO.S...@NO.SPAMverizon.net> wrote:
> Give this a try...
>
> =10+10*(A1="FOR CHANGE")
>
> and copy it down as needed.
>
> --
> Rick (MVP - Excel)
>
> "Robincambs" <marvellous...@gmail.com> wrote in message
>
> news:cf08ca94-9d6c-4e28-b423-(E-Mail Removed)...
>
>
>
> >I am looking to assign a value to a text string and then insert the
> > corresponding value into a cell

>
> > As follows:

>
> > A1 to A100 could equal "NO CHANGE" or "FOR CHANGE"
> > If A1 = "NO CHANGE" then I1 = "10" else if A1 = "FOR CHANGE" then I1 =
> > "20"
> > If A2 = "NO CHANGE" then I2 = "10" else if A2 = "FOR CHANGE" then I2 =
> > "20"

>
> > then this to loop until A100

>
> > any help will be gratefully received- Hide quoted text -

>
> - Show quoted text -


Thanks for the suggestion, it doesn't do what i was hoping. There are
2 possible entries of text "NO CHANGE" or "FOR CHANGE" the suggestion
you made only provives a result of 10

Thanks
Rob
 
Reply With Quote
 
Rick Rothstein
Guest
Posts: n/a
 
      22nd Sep 2008
What I posted will return 20 if A1 contains "FOR CHANGE" and will return 10
otherwise. Perhaps you mean it returns 10 if A1 is blank? Try this then...

=IF(A1="","",10+10*(A1="FOR CHANGE"))

--
Rick (MVP - Excel)


"Robincambs" <(E-Mail Removed)> wrote in message
news:f6507ff7-af8b-4e85-8c57-(E-Mail Removed)...
> On 22 Sep, 14:17, "Rick Rothstein"
> <rick.newsNO.S...@NO.SPAMverizon.net> wrote:
>> Give this a try...
>>
>> =10+10*(A1="FOR CHANGE")
>>
>> and copy it down as needed.
>>
>> --
>> Rick (MVP - Excel)
>>
>> "Robincambs" <marvellous...@gmail.com> wrote in message
>>
>> news:cf08ca94-9d6c-4e28-b423-(E-Mail Removed)...
>>
>>
>>
>> >I am looking to assign a value to a text string and then insert the
>> > corresponding value into a cell

>>
>> > As follows:

>>
>> > A1 to A100 could equal "NO CHANGE" or "FOR CHANGE"
>> > If A1 = "NO CHANGE" then I1 = "10" else if A1 = "FOR CHANGE" then I1 =
>> > "20"
>> > If A2 = "NO CHANGE" then I2 = "10" else if A2 = "FOR CHANGE" then I2 =
>> > "20"

>>
>> > then this to loop until A100

>>
>> > any help will be gratefully received- Hide quoted text -

>>
>> - Show quoted text -

>
> Thanks for the suggestion, it doesn't do what i was hoping. There are
> 2 possible entries of text "NO CHANGE" or "FOR CHANGE" the suggestion
> you made only provives a result of 10
>
> Thanks
> Rob


 
Reply With Quote
 
Robincambs
Guest
Posts: n/a
 
      22nd Sep 2008
On 22 Sep, 14:25, Stefi <St...@discussions.microsoft.com> wrote:
> Enter
> =IF(A1="NO CHANGE",10,20)
> and drag it down to A100.
>
> Regards,
> Stefi
>
> Robincambs ezt rta:
>
>
>
> > I am looking to assign a value to a text string and then insert the
> > corresponding value into a cell

>
> > As follows:

>
> > A1 to A100 could equal "NO CHANGE" or "FOR CHANGE"
> > If A1 = "NO CHANGE" then I1 = "10" else if A1 = "FOR CHANGE" thenI1 =
> > "20"
> > If A2 = "NO CHANGE" then I2 = "10" else if A2 = "FOR CHANGE" thenI2 =
> > "20"

>
> > then this to loop until A100

>
> > any help will be gratefully received- Hide quoted text -

>
> - Show quoted text -


Unfortunatly neither of those work - perhaps its due to me using
conditional formatting or dropdown lists?
 
Reply With Quote
 
Robincambs
Guest
Posts: n/a
 
      22nd Sep 2008
On 22 Sep, 14:47, "Rick Rothstein"
<rick.newsNO.S...@NO.SPAMverizon.net> wrote:
> What I posted will return 20 if A1 contains "FOR CHANGE" and will return 10
> otherwise. Perhaps you mean it returns 10 if A1 is blank? Try this then...
>
> =IF(A1="","",10+10*(A1="FOR CHANGE"))
>
> --
> Rick (MVP - Excel)
>
> "Robincambs" <marvellous...@gmail.com> wrote in message
>
> news:f6507ff7-af8b-4e85-8c57-(E-Mail Removed)...
>
>
>
> > On 22 Sep, 14:17, "Rick Rothstein"
> > <rick.newsNO.S...@NO.SPAMverizon.net> wrote:
> >> Give this a try...

>
> >> =10+10*(A1="FOR CHANGE")

>
> >> and copy it down as needed.

>
> >> --
> >> Rick (MVP - Excel)

>
> >> "Robincambs" <marvellous...@gmail.com> wrote in message

>
> >>news:cf08ca94-9d6c-4e28-b423-(E-Mail Removed)...

>
> >> >I am looking to assign a value to a text string and then insert the
> >> > corresponding value into a cell

>
> >> > As follows:

>
> >> > A1 to A100 could equal "NO CHANGE" or "FOR CHANGE"
> >> > If A1 = "NO CHANGE" then I1 = "10" else if A1 = "FOR CHANGE" then I1 =
> >> > "20"
> >> > If A2 = "NO CHANGE" then I2 = "10" else if A2 = "FOR CHANGE" then I2 =
> >> > "20"

>
> >> > then this to loop until A100

>
> >> > any help will be gratefully received- Hide quoted text -

>
> >> - Show quoted text -

>
> > Thanks for the suggestion, it doesn't do what i was hoping. There are
> > 2 possible entries of text "NO CHANGE" or "FOR CHANGE" the suggestion
> > you made only provives a result of 10

>
> > Thanks
> > Rob- Hide quoted text -

>
> - Show quoted text -


Yes - that works great, how could i address 3 different conditions
such as NO CHANGE" or "FOR CHANGE" or "PENDING CHANGE"
 
Reply With Quote
 
Stefi
Guest
Posts: n/a
 
      22nd Sep 2008

> Unfortunatly neither of those work - perhaps its due to me using
> conditional formatting or dropdown lists?


I don't think so, something else must be the problem, either Rick's solution
or mine should work, maybe your data contain some factor (case, redundant
spaces, etc.) Please post sample data!

Stefi

 
Reply With Quote
 
Rick Rothstein
Guest
Posts: n/a
 
      22nd Sep 2008
It is usually easier if you follow the same posting method as the person who
responded to you... in my case, posting the responses at the top of the
message (that way the text is not bouncing back and forth from top to
bottom).

As for your problem... conditional formatting or dropdown lists should not
affect the formulas that have been posted from working. I am going to guess
that you have more in your cells than NO CHANGE or FOR CHANGE... perhaps
some extra spaces at the front or back?

--
Rick (MVP - Excel)


> Unfortunatly neither of those work - perhaps its due to me using
> conditional formatting or dropdown lists?


 
Reply With Quote
 
Robincambs
Guest
Posts: n/a
 
      22nd Sep 2008
Sorry about the user group etiquette, something i'm not farmiliar
with.

I have found your suggestion works fine - it was my formatting that
was at fault.

how could i address 3 different conditions and assign 3 values
such as NO CHANGE" = 10 or "FOR CHANGE" = 20 or "PENDING CHANGE" = 30

Kind regards
Rob

On 22 Sep, 15:05, "Rick Rothstein"
<rick.newsNO.S...@NO.SPAMverizon.net> wrote:
> It is usually easier if you follow the same posting method as the person who
> responded to you... in my case, posting the responses at the top of the
> message (that way the text is not bouncing back and forth from top to
> bottom).
>
> As for your problem... conditional formatting or dropdown lists should not
> affect the formulas that have been posted from working. I am going to guess
> that you have more in your cells than NO CHANGE or FOR CHANGE... perhaps
> some extra spaces at the front or back?
>
> --
> Rick (MVP - Excel)
>
>
>
> > Unfortunatly neither of those work - perhaps its due to me using
> > conditional formatting or dropdown lists?- Hide quoted text -

>
> - Show quoted text -


 
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
Re: Assigning a value to a text box. fredg Microsoft Access Reports 0 14th Jan 2009 04:53 PM
assigning numbers to text and count the text gimme_donuts Microsoft Excel Misc 2 5th Jan 2009 09:50 AM
assigning a text box value =?Utf-8?B?Q2FybGVl?= Microsoft Access Reports 2 30th Mar 2005 07:08 PM
assigning value to text box =?Utf-8?B?TWljaGFlbCBNaWxsZXI=?= Microsoft Access Reports 8 9th Dec 2004 09:21 PM
Assigning text from outside source to Access form text box =?Utf-8?B?U2VsZlRhdWdodDE=?= Microsoft Access Macros 0 3rd Nov 2004 08:59 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:05 PM.