Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Dynamically setting CELL COLORS based on TWO OTHER cell values | Excel Discussion (Misc queries) | |||
Setting values in a cell | Excel Discussion (Misc queries) | |||
Insert a value in a cell based upon a comparison of cell values in 2 separate worksheets | Excel Discussion (Misc queries) | |||
Insert a value in a cell based upon a comparison of cell values in 2 separate worksheets | Excel Worksheet Functions | |||
Format cell color based on multiple cell values | Excel Discussion (Misc queries) |