Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Add If formula in macro (replace cell text value with numeric valu | Excel Discussion (Misc queries) | |||
Replace Cell Value with Formula | Excel Discussion (Misc queries) | |||
Can I replace a ' at the beginning of a text cell using Replace | Excel Discussion (Misc queries) | |||
How do I replace text within a formula with a diff cell value? | Excel Worksheet Functions | |||
How Do I find/replace a blank cell with a formula? | Excel Worksheet Functions |