Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Anthony
 
Posts: n/a
Default Macros & search /replace

Use a macro to convert data files imported as CSV files into the correct
format for importation into another program.
Column A contains words COW, BULL, STEER,HEIFER

Need to add to my macro a formula that will examine column A and insert in
adjacent cell column G a "M" if the Column A cell contains Bull, "F" if the
A Cell contains COW or HEIFER; and "C" if it contains Steers

Any help greatly appreciated

thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Roger Govier
 
Posts: n/a
Default Macros & search /replace

Hi Anthony
Try
=IF(A1="","",IF(OR(A1="HEIFER",A1="COW"),"F",IF(A1 ="BULL","M","C")))


--
Regards

Roger Govier


Anthony wrote
Use a macro to convert data files imported as CSV files into the
correct format for importation into another program.
Column A contains words COW, BULL, STEER,HEIFER
Need to add to my macro a formula that will examine column A and
insert in adjacent cell column G a "M" if the Column A cell
contains Bull, "F" if the A Cell contains COW or HEIFER; and "C" if
it contains Steers Any help greatly appreciated
thanks





  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JE McGimpsey
 
Posts: n/a
Default Macros & search /replace

One way:

G1: =LOOKUP(A1,{"BULL","COW","HEIFER","STEER"},{"M","F ","F","C"})


In article ,
"Anthony" wrote:

Use a macro to convert data files imported as CSV files into the correct
format for importation into another program.
Column A contains words COW, BULL, STEER,HEIFER

Need to add to my macro a formula that will examine column A and insert in
adjacent cell column G a "M" if the Column A cell contains Bull, "F" if the
A Cell contains COW or HEIFER; and "C" if it contains Steers

Any help greatly appreciated

thanks

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
Excel crashes while opening excel file imbeddied with macros ct2147 Excel Discussion (Misc queries) 0 December 30th 05 09:05 PM
FAQ Spreadsheet with search function murphyz Excel Discussion (Misc queries) 0 March 19th 05 09:24 PM
problem:search results negative in excel docs with macros spirit39 Excel Discussion (Misc queries) 0 February 10th 05 11:01 PM
Enabling macros Peter M Excel Discussion (Misc queries) 3 February 7th 05 10:57 PM
Transferring toolbars and macros to other computers Darrell Excel Discussion (Misc queries) 1 January 19th 05 12:21 AM


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