Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 33
Default Find and replace in a different cell

If my data looks like this and I want to pick a number and have the cell
under it filled with a number of my choosing, what's my best option?

A 10 20 30 40 50

B 25 35 45 55 65

C 15 20 25 30 35
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default Find and replace in a different cell

Use VBA. Right click on sheet tab, view code, paste this in. Modify beginning
statements as desired.

Sub FindReplace()

'Value you want to find
xFind = 5
'Value you want to input
xReplace = 50
Cells.Find(What:=xFind, After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:=False _
, SearchFormat:=False).Activate
ActiveCell.Offset(-1).Value = xReplace
End Sub
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"PointerMan" wrote:

If my data looks like this and I want to pick a number and have the cell
under it filled with a number of my choosing, what's my best option?

A 10 20 30 40 50

B 25 35 45 55 65

C 15 20 25 30 35

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
Find & Replace: find part cell, replace whole cell katy Excel Worksheet Functions 3 April 3rd 23 01:20 PM
find replace the 1st character in a cell Pete Excel Discussion (Misc queries) 2 March 31st 08 07:27 AM
Find/Replace changes cell format ?????? Woland99 Excel Discussion (Misc queries) 2 January 23rd 08 10:07 AM
Find and replace # with new line in a cell. rmellison Excel Discussion (Misc queries) 6 December 17th 07 02:58 PM
Find comment replace cell value [email protected] Excel Discussion (Misc queries) 3 July 5th 06 09:42 PM


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