Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Bob is offline
external usenet poster
 
Posts: 972
Default setting cell values based on a 3rd cell

Hi - can anyone help me with an Excel 2003 question? I'm working with 3 cells:
a1 [format m/d/yyyy h:mm] - contents= 1/1/2010
b1 [format m/d/yyyy h:mm] - contents= null
c1 [format text] - contents "CLOSED"
All column & cell values are loaded in from a csv file. I can't [i.e. don't
want to] place a formula in cell b1 'cause I'll lose it on the next import,
so I'm trying to place a formula in a 4th cell [d1] that will a) see if c1
contains a value of "CLOSED", b) if true, take the date/time from a1, and c)
place it in b1. I've tried variations using IF and EXACT formulae & had no
success; e.g.
=IF(c1="CLOSED",b1=c1
=IF(c1="CLOSED",((VALUE(b1=A1))
Any suggestions on hot to get it done? thanks!!!! - bob
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Bob is offline
external usenet poster
 
Posts: 972
Default CORRECTION - setting cell values based on a 3rd cell

=IF(c1="CLOSED",b1=c1 SHOULD READ =IF(c1="CLOSED",b1=a1



"Bob" wrote:

Hi - can anyone help me with an Excel 2003 question? I'm working with 3 cells:
a1 [format m/d/yyyy h:mm] - contents= 1/1/2010
b1 [format m/d/yyyy h:mm] - contents= null
c1 [format text] - contents "CLOSED"
All column & cell values are loaded in from a csv file. I can't [i.e. don't
want to] place a formula in cell b1 'cause I'll lose it on the next import,
so I'm trying to place a formula in a 4th cell [d1] that will a) see if c1
contains a value of "CLOSED", b) if true, take the date/time from a1, and c)
place it in b1. I've tried variations using IF and EXACT formulae & had no
success; e.g.
=IF(c1="CLOSED",b1=c1
=IF(c1="CLOSED",((VALUE(b1=A1))
Any suggestions on hot to get it done? thanks!!!! - bob

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default CORRECTION - setting cell values based on a 3rd cell

First, a formula can't change the value in another cell.

But you could create a formula in D1 and then just move (drag) into B1:

=if(c1="closed",a1,"")

=============
Another option would be to record a macro when you import your text file. Then
have that macro add the formula into the cells in column B.



Bob wrote:

=IF(c1="CLOSED",b1=c1 SHOULD READ =IF(c1="CLOSED",b1=a1

"Bob" wrote:

Hi - can anyone help me with an Excel 2003 question? I'm working with 3 cells:
a1 [format m/d/yyyy h:mm] - contents= 1/1/2010
b1 [format m/d/yyyy h:mm] - contents= null
c1 [format text] - contents "CLOSED"
All column & cell values are loaded in from a csv file. I can't [i.e. don't
want to] place a formula in cell b1 'cause I'll lose it on the next import,
so I'm trying to place a formula in a 4th cell [d1] that will a) see if c1
contains a value of "CLOSED", b) if true, take the date/time from a1, and c)
place it in b1. I've tried variations using IF and EXACT formulae & had no
success; e.g.
=IF(c1="CLOSED",b1=c1
=IF(c1="CLOSED",((VALUE(b1=A1))
Any suggestions on hot to get it done? thanks!!!! - bob


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Bob is offline
external usenet poster
 
Posts: 972
Default CORRECTION - setting cell values based on a 3rd cell

Thank you, Dave!! sounds like I probably need to go the macro route.....

"Dave Peterson" wrote:

First, a formula can't change the value in another cell.

But you could create a formula in D1 and then just move (drag) into B1:

=if(c1="closed",a1,"")

=============
Another option would be to record a macro when you import your text file. Then
have that macro add the formula into the cells in column B.



Bob wrote:

=IF(c1="CLOSED",b1=c1 SHOULD READ =IF(c1="CLOSED",b1=a1

"Bob" wrote:

Hi - can anyone help me with an Excel 2003 question? I'm working with 3 cells:
a1 [format m/d/yyyy h:mm] - contents= 1/1/2010
b1 [format m/d/yyyy h:mm] - contents= null
c1 [format text] - contents "CLOSED"
All column & cell values are loaded in from a csv file. I can't [i.e. don't
want to] place a formula in cell b1 'cause I'll lose it on the next import,
so I'm trying to place a formula in a 4th cell [d1] that will a) see if c1
contains a value of "CLOSED", b) if true, take the date/time from a1, and c)
place it in b1. I've tried variations using IF and EXACT formulae & had no
success; e.g.
=IF(c1="CLOSED",b1=c1
=IF(c1="CLOSED",((VALUE(b1=A1))
Any suggestions on hot to get it done? thanks!!!! - bob


--

Dave Peterson
.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default CORRECTION - setting cell values based on a 3rd cell

When I have to do this kind of stuff, I'll record a macro when I open the text
file. This will make sure that I get the right layout/syntax for each of the
fields.

After that, it's pretty straight forward to add the formulas (or even convert
them to values???).

If you need help, you can post the recorded code and a few more details...

Does the file name stay the same or can it vary?

Does the imported data go into a specific location (in the activeworkbook???) or
can it be left in the workbook that was created when you opened the text file?

If the extension is .csv, then it's better to rename it .txt so that your code
can control how each field should be treated.

Bob wrote:

Thank you, Dave!! sounds like I probably need to go the macro route.....

"Dave Peterson" wrote:

First, a formula can't change the value in another cell.

But you could create a formula in D1 and then just move (drag) into B1:

=if(c1="closed",a1,"")

=============
Another option would be to record a macro when you import your text file. Then
have that macro add the formula into the cells in column B.



Bob wrote:

=IF(c1="CLOSED",b1=c1 SHOULD READ =IF(c1="CLOSED",b1=a1

"Bob" wrote:

Hi - can anyone help me with an Excel 2003 question? I'm working with 3 cells:
a1 [format m/d/yyyy h:mm] - contents= 1/1/2010
b1 [format m/d/yyyy h:mm] - contents= null
c1 [format text] - contents "CLOSED"
All column & cell values are loaded in from a csv file. I can't [i.e. don't
want to] place a formula in cell b1 'cause I'll lose it on the next import,
so I'm trying to place a formula in a 4th cell [d1] that will a) see if c1
contains a value of "CLOSED", b) if true, take the date/time from a1, and c)
place it in b1. I've tried variations using IF and EXACT formulae & had no
success; e.g.
=IF(c1="CLOSED",b1=c1
=IF(c1="CLOSED",((VALUE(b1=A1))
Any suggestions on hot to get it done? thanks!!!! - bob


--

Dave Peterson
.


--

Dave Peterson
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
Dynamically setting CELL COLORS based on TWO OTHER cell values Tom Excel Discussion (Misc queries) 3 February 22nd 09 07:34 PM
Setting values in a cell Stephen Excel Discussion (Misc queries) 3 July 10th 08 08:23 PM
Insert a value in a cell based upon a comparison of cell values in 2 separate worksheets Doctorjones_md Excel Discussion (Misc queries) 7 June 8th 07 09:32 PM
Insert a value in a cell based upon a comparison of cell values in 2 separate worksheets Doctorjones_md Excel Worksheet Functions 7 June 8th 07 09:32 PM
Format cell color based on multiple cell values Zenaida Excel Discussion (Misc queries) 1 May 10th 06 07:31 PM


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