Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 355
Default Need formula or code

Hello -

I have a formula in A2:A500. I need to put the value of that formula (in
other words, the text it generates) into P2:P500.

What's the best way to accomplish this?

Any help will be greatly appreciated!
--
Sandy
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 225
Default Need formula or code

In Excel,
Select A2:A500
Edit/Copy (ctrl-C)
Select P2
Edit/Paste Special/Values


In VBA:
Range("P2:P500").Value = Range("A2:A500").Value


Sandy wrote:
Hello -

I have a formula in A2:A500. I need to put the value of that formula (in
other words, the text it generates) into P2:P500.

What's the best way to accomplish this?

Any help will be greatly appreciated!
--
Sandy


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 355
Default Need formula or code

Hi Andrew -

Thank you for your response.

I need code or a formula, because this is for other users.

In particular, if I use VBA, I need to know what event to put it in.

If there is a formula that could accomplish this, it would be easier;
however, I don't know if one exists.

--
Sandy


"Andrew Taylor" wrote:

In Excel,
Select A2:A500
Edit/Copy (ctrl-C)
Select P2
Edit/Paste Special/Values


In VBA:
Range("P2:P500").Value = Range("A2:A500").Value


Sandy wrote:
Hello -

I have a formula in A2:A500. I need to put the value of that formula (in
other words, the text it generates) into P2:P500.

What's the best way to accomplish this?

Any help will be greatly appreciated!
--
Sandy



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Need formula or code

P2: = A2

and copy down.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Sandy" wrote in message
...
Hello -

I have a formula in A2:A500. I need to put the value of that formula (in
other words, the text it generates) into P2:P500.

What's the best way to accomplish this?

Any help will be greatly appreciated!
--
Sandy



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 355
Default Need formula or code

Hi Bob -

Thank you for responding.

Unless I'm missing something, I couldn't get your formula to work!
--
Sandy


"Bob Phillips" wrote:

P2: = A2

and copy down.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Sandy" wrote in message
...
Hello -

I have a formula in A2:A500. I need to put the value of that formula (in
other words, the text it generates) into P2:P500.

What's the best way to accomplish this?

Any help will be greatly appreciated!
--
Sandy






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 698
Default Need formula or code

Bob offered this

P2: = A2

If you put in P2:=A2

then drop the P2: and use =A2

HTH
Regards,
Howard

"Sandy" wrote in message
...
Hello -

I have a formula in A2:A500. I need to put the value of that formula (in
other words, the text it generates) into P2:P500.

What's the best way to accomplish this?

Any help will be greatly appreciated!
--
Sandy



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 355
Default Need formula or code

Thanks!

Boy, was I overcomplicating this! I automatically assumed if I didn't
somehow refer to "value," that it would just copy the formula.

Thanks again for solving my problem -- works beautifully!
--
Sandy


"L. Howard Kittle" wrote:

Bob offered this

P2: = A2

If you put in P2:=A2

then drop the P2: and use =A2

HTH
Regards,
Howard

"Sandy" wrote in message
...
Hello -

I have a formula in A2:A500. I need to put the value of that formula (in
other words, the text it generates) into P2:P500.

What's the best way to accomplish this?

Any help will be greatly appreciated!
--
Sandy




  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 355
Default Need formula or code

Woops! I spoke too soon. I'm obviously not awake yet.

I need to have the actual text (not the formula "a2") in the P column. This
column will be referred to by a graph and needs the actual name of a person
in it. That actual name is derived from the following formula in Column A.
(This formula was nicely supplied to me by someone in this newsgroup, BTW.)

=IF(ISERROR(INDEX(Sheet2!A:A,MATCH(B2,Sheet2!B:B,0 ),1)),"",INDEX(Sheet2!A:A,MATCH(B2,Sheet2!B:B,0),1 ))

Any other suggestions?
--
Sandy


"L. Howard Kittle" wrote:

Bob offered this

P2: = A2

If you put in P2:=A2

then drop the P2: and use =A2

HTH
Regards,
Howard

"Sandy" wrote in message
...
Hello -

I have a formula in A2:A500. I need to put the value of that formula (in
other words, the text it generates) into P2:P500.

What's the best way to accomplish this?

Any help will be greatly appreciated!
--
Sandy




  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Need formula or code

will this work?

Sub copy_Values()
Range("P2:P500") = Range("a2:a500").Value
End Sub
--


Gary


"Sandy" wrote in message
...
Hello -

I have a formula in A2:A500. I need to put the value of that formula (in
other words, the text it generates) into P2:P500.

What's the best way to accomplish this?

Any help will be greatly appreciated!
--
Sandy



  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 355
Default Need formula or code

Thanks for your response, Gary! The post above solved the problem quite
simply.

You did the same thing I attempted to do and wasn't satisfied with --
created code. It works, but I was trying for something easier for the user.
The problem with the code was finding an event to fire it in. The only way
around it I found was to create a button which I did not really want to do.

Thanks so much for replying, however!
--
Sandy


"Gary Keramidas" wrote:

will this work?

Sub copy_Values()
Range("P2:P500") = Range("a2:a500").Value
End Sub
--


Gary


"Sandy" wrote in message
...
Hello -

I have a formula in A2:A500. I need to put the value of that formula (in
other words, the text it generates) into P2:P500.

What's the best way to accomplish this?

Any help will be greatly appreciated!
--
Sandy






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
formula through vb code Jonsson[_48_] Excel Programming 4 September 19th 05 11:30 AM
Help with my code and formula yh73090[_2_] Excel Programming 1 August 30th 04 06:06 AM
Have a Formula I want to put in to some Code Q John Excel Programming 2 June 5th 04 04:39 PM
Not sure if I need a formula or some code.... Candee[_19_] Excel Programming 5 April 16th 04 04:50 PM
Help with code or formula Gareth[_3_] Excel Programming 8 October 18th 03 12:43 AM


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