Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 32
Default Use Formula to Replace A Cell

I'm trying to use a formula to replace or delete text in another cell.

I have a list from 1-10. I want to generate a result from 1-10 and delete
that number from the list.

Example: Cell A1 will determine which number is deleted, and cells B1:B10
contain the numbers 1 through 10, respectively. Let's say cell A1 has the
number 2. The formula should find the number 2 in the range (b1:b10) and
delete it.

This doesn't seem too hard but I can't figure it out.

Thanks!

Chris

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 32
Default Use Formula to Replace A Cell

I actually want to do this in a Visual Basic button command, so if there's a
way to get the cursor to go to a specific cell based on the result of a
formula, that's what I need. Thanks!

"opieandy" wrote:

I'm trying to use a formula to replace or delete text in another cell.

I have a list from 1-10. I want to generate a result from 1-10 and delete
that number from the list.

Example: Cell A1 will determine which number is deleted, and cells B1:B10
contain the numbers 1 through 10, respectively. Let's say cell A1 has the
number 2. The formula should find the number 2 in the range (b1:b10) and
delete it.

This doesn't seem too hard but I can't figure it out.

Thanks!

Chris

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Use Formula to Replace A Cell

Try the below macro which works on the activesheet. Try and feedback

Sub Macro()
Set varfound = Range("B1:B10").Find(Range("A1"))
If Not varfound Is Nothing Then
Range("B" & varfound.Row) = ""
End If
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"opieandy" wrote:

I actually want to do this in a Visual Basic button command, so if there's a
way to get the cursor to go to a specific cell based on the result of a
formula, that's what I need. Thanks!

"opieandy" wrote:

I'm trying to use a formula to replace or delete text in another cell.

I have a list from 1-10. I want to generate a result from 1-10 and delete
that number from the list.

Example: Cell A1 will determine which number is deleted, and cells B1:B10
contain the numbers 1 through 10, respectively. Let's say cell A1 has the
number 2. The formula should find the number 2 in the range (b1:b10) and
delete it.

This doesn't seem too hard but I can't figure it out.

Thanks!

Chris

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 32
Default Use Formula to Replace A Cell

Thanks, Jacob, that worked!!!

"Jacob Skaria" wrote:

Try the below macro which works on the activesheet. Try and feedback

Sub Macro()
Set varfound = Range("B1:B10").Find(Range("A1"))
If Not varfound Is Nothing Then
Range("B" & varfound.Row) = ""
End If
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"opieandy" wrote:

I actually want to do this in a Visual Basic button command, so if there's a
way to get the cursor to go to a specific cell based on the result of a
formula, that's what I need. Thanks!

"opieandy" wrote:

I'm trying to use a formula to replace or delete text in another cell.

I have a list from 1-10. I want to generate a result from 1-10 and delete
that number from the list.

Example: Cell A1 will determine which number is deleted, and cells B1:B10
contain the numbers 1 through 10, respectively. Let's say cell A1 has the
number 2. The formula should find the number 2 in the range (b1:b10) and
delete it.

This doesn't seem too hard but I can't figure it out.

Thanks!

Chris

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
Add If formula in macro (replace cell text value with numeric valu CVinje Excel Discussion (Misc queries) 1 March 21st 09 09:13 AM
Replace Cell Value with Formula MaryMalone Excel Discussion (Misc queries) 3 May 6th 08 08:08 PM
Can I replace a ' at the beginning of a text cell using Replace Hilde Excel Discussion (Misc queries) 4 September 10th 07 06:22 PM
How do I replace text within a formula with a diff cell value? Eric_G Excel Worksheet Functions 1 July 18th 07 03:30 PM
How Do I find/replace a blank cell with a formula? Alvin Excel Worksheet Functions 2 June 23rd 06 08:25 PM


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

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"