ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Need formula or code (https://www.excelbanter.com/excel-programming/358729-need-formula-code.html)

Sandy

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

Bob Phillips[_6_]

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




Andrew Taylor

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



Sandy

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




Sandy

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





L. Howard Kittle

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




Gary Keramidas

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




Sandy

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





Sandy

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





Sandy

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






All times are GMT +1. The time now is 09:31 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com