Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rob Rob is offline
external usenet poster
 
Posts: 718
Default find and replace data

How would I find and replace data conditionally. In the example below I
would like to take Workbook 2, A1:A3 and replace abc with 123. Something
like:
=IF(A1:A3=abc,substitue [123],"") but that doesn't work.

Workbook 1
| A | B | C |
1|abc | 123 | |
2|bcd | 234 | |
3|cde | 345 | |
Workbook 2
| A | B | C |
1|abc | XX | XX |
2|bcd | XX | XX |
3|cde | XX | XX |
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 221
Default find and replace data

G'day Rob

You could try something like:

Either in WorkBook1 (somewhere off screen), or in a NewWorkSheet, you could
setup an Array.

Assumed NewWorkBook
A B
ABC 123
BCD 234
CDE 345
DEF 456
EFG 567
FGH 678
GHI 789

In WorkBook1

B1 =

=IF('WorkBook2'$A1="","",(LOOKUP(WorkBook2!$A1,New WorkBook!$A$1:$B$7,NewWorkBook!$B$1:$B$7)))

Copy Down as required

HTH
Mark.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rob Rob is offline
external usenet poster
 
Posts: 718
Default find and replace data

By messing around I stumbled on the vlookup function which does exactly what
I was looking for. I built an array on a seperate workbook and referenced it
in the vlookup function. Works like a charm.

"Rob" wrote:

How would I find and replace data conditionally. In the example below I
would like to take Workbook 2, A1:A3 and replace abc with 123. Something
like:
=IF(A1:A3=abc,substitue [123],"") but that doesn't work.

Workbook 1
| A | B | C |
1|abc | 123 | |
2|bcd | 234 | |
3|cde | 345 | |
Workbook 2
| A | B | C |
1|abc | XX | XX |
2|bcd | XX | XX |
3|cde | XX | XX |

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 221
Default find and replace data

Glad I could help Rob

Appreciate the feedback.

Mark.


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 External Data Web Query Gary Spranger Excel Worksheet Functions 3 July 4th 07 06:40 PM
find and replace - replace data in rows to separated by commas msdker Excel Worksheet Functions 1 April 15th 06 01:00 AM
How to find/replace data in column Rock Excel Discussion (Misc queries) 3 November 16th 05 02:28 AM
How to find/replace data in column Rock New Users to Excel 4 November 15th 05 10:52 PM
Data Validation / find & replace Penny Excel Discussion (Misc queries) 1 July 20th 05 08:45 PM


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

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"