Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Cecil
 
Posts: n/a
Default Column of Data - Set Next Column Value Conditionally


Column A contains text data ... unlimited set of values. Column B
contains a limited set of values, depending on the value of column A.
The Column B values are pre-set by another program. I would like to
_change_ the value of a column B cell if the column A value equals a
certain value. Otherwise the column B value should stay as is. How
can I do that?

Example Data Set
COL-A COL-B
AAA horse
BBB cow
CCC donkey
DDD dog
BBB cow
MMM cat
Situation If COL-A value = DDD, would like to change value in COL-B
from donkey to mule


--
Cecil
------------------------------------------------------------------------
Cecil's Profile: http://www.excelforum.com/member.php...o&userid=29035
View this thread: http://www.excelforum.com/showthread...hreadid=542932

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernard Liengme
 
Posts: n/a
Default Column of Data - Set Next Column Value Conditionally

You cannot do this with a function since a cell cannot have BOTH its own
value and a formula that changes it.
You could use a 'helper' column. In C1 for example, we could have
=IF(ISNA(VLOOKUP(A1,Sheet2!A1:B100,2,FALSE),B1,
VLOOKUP(A1,Sheet2!A1:B100,2,FALSE))
The formula looks at A1,attempts to locate its value in a table on Sheet2;
if it is not found then C1 gets B1's value otherwise a value from the table
is used.

I suppose you could also hid column B.
best wishes

--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Cecil" wrote in
message ...

Column A contains text data ... unlimited set of values. Column B
contains a limited set of values, depending on the value of column A.
The Column B values are pre-set by another program. I would like to
_change_ the value of a column B cell if the column A value equals a
certain value. Otherwise the column B value should stay as is. How
can I do that?

Example Data Set
COL-A COL-B
AAA horse
BBB cow
CCC donkey
DDD dog
BBB cow
MMM cat
Situation If COL-A value = DDD, would like to change value in COL-B
from donkey to mule


--
Cecil
------------------------------------------------------------------------
Cecil's Profile:
http://www.excelforum.com/member.php...o&userid=29035
View this thread: http://www.excelforum.com/showthread...hreadid=542932



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary
 
Posts: n/a
Default Column of Data - Set Next Column Value Conditionally

Enter this in B1 and drag it down.

=If(A1="DDD","mule","donkey")


"Cecil" wrote in
message ...

Column A contains text data ... unlimited set of values. Column B
contains a limited set of values, depending on the value of column A.
The Column B values are pre-set by another program. I would like to
_change_ the value of a column B cell if the column A value equals a
certain value. Otherwise the column B value should stay as is. How
can I do that?

Example Data Set
COL-A COL-B
AAA horse
BBB cow
CCC donkey
DDD dog
BBB cow
MMM cat
Situation If COL-A value = DDD, would like to change value in COL-B
from donkey to mule


--
Cecil
------------------------------------------------------------------------
Cecil's Profile:
http://www.excelforum.com/member.php...o&userid=29035
View this thread: http://www.excelforum.com/showthread...hreadid=542932



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
Otto M. - Data Matching Gilly Excel Worksheet Functions 0 May 12th 06 06:29 PM
Need to Improve Code Copying/Pasting Between Workbooks David Excel Discussion (Misc queries) 1 January 6th 06 03:56 AM
Excel Macro to Copy & Paste [email protected] Excel Worksheet Functions 0 December 1st 05 01:56 PM
Return Count for LAST NonBlank Cell in each Row Sam via OfficeKB.com Excel Worksheet Functions 12 April 17th 05 10:36 PM
Can you average data in 1 column based on a range of values in another? kman24 Excel Worksheet Functions 2 November 17th 04 02:09 PM


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