Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default How to add a formula using a macro

How do I find a string of characters like "?---?" on the worksheet then
replace them with the cell value in the cell directly above them using a
macro. For example I might find the "?---?" in C23 and need to replace it
with the value in B23. The value is always the one directly above. I know how
to "find/replace" but this seems to be creating an absolute reference despite
the fact that I don't have any $ preceeding the string.
Thanks
LP
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default How to add a formula using a macro

Hi,

Select the range, say B5:G560. Now pres Ctrl+F and in the find box, type
?---?. Click on Find All and then press Ctrl+A. This Now click on close.
This will select all the ?---? entries in the range B5:G560. Now perform
the foll steps:

1. Press =
2. Up arrow key;
3. Ctrl+Enter

All the ?---? will be replaced by the value in the cell above

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Lawribird" wrote in message
...
How do I find a string of characters like "?---?" on the worksheet then
replace them with the cell value in the cell directly above them using a
macro. For example I might find the "?---?" in C23 and need to replace it
with the value in B23. The value is always the one directly above. I know
how
to "find/replace" but this seems to be creating an absolute reference
despite
the fact that I don't have any $ preceeding the string.
Thanks
LP


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
Macro formula help El Bee Excel Worksheet Functions 5 October 20th 08 04:16 PM
Formula or Macro Meadowlark Excel Discussion (Misc queries) 5 February 27th 08 03:59 PM
Formula or Macro M Hebert Excel Discussion (Misc queries) 2 June 27th 07 01:24 PM
Macro Formula for Max value El Bee Excel Worksheet Functions 4 December 8th 06 04:08 PM
Help with a macro/formula brefed15 Excel Worksheet Functions 5 June 19th 06 08:19 PM


All times are GMT +1. The time now is 05:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"