![]() |
trying to reference a cell in a line of text
Hello, I have 1000 ID numbers and I want to reference those ID numbers in a line of text. Basically, I have 1000 lines of text I need to write and want to use excel to do it. What I want to do is something like this: if x= 'contents of A1' then i1 = 1 otherwise if x<'contents of A1' then i1= 0 if x= 'contents of A2' then i2 = 1 otherwise if x<'contents of A2' then i2=0 ... if x='contents of A1000' then i1000=1 otherwise if x<'contents of A1000' then i 1000=0 I am completely lost as to how to do this. Any help would be greatly appreciated. Thanks, Josh -- jspizman ------------------------------------------------------------------------ jspizman's Profile: http://www.excelforum.com/member.php...o&userid=30694 View this thread: http://www.excelforum.com/showthread...hreadid=570072 |
trying to reference a cell in a line of text
This assumes that the "if" is text and not a formula. In cell B1 enter:
="if x= " & A1 & " then i1 = 1 otherwise if x<" & A1 & " then i1= 0" -- Gary's Student "jspizman" wrote: Hello, I have 1000 ID numbers and I want to reference those ID numbers in a line of text. Basically, I have 1000 lines of text I need to write and want to use excel to do it. What I want to do is something like this: if x= 'contents of A1' then i1 = 1 otherwise if x<'contents of A1' then i1= 0 if x= 'contents of A2' then i2 = 1 otherwise if x<'contents of A2' then i2=0 ... if x='contents of A1000' then i1000=1 otherwise if x<'contents of A1000' then i 1000=0 I am completely lost as to how to do this. Any help would be greatly appreciated. Thanks, Josh -- jspizman ------------------------------------------------------------------------ jspizman's Profile: http://www.excelforum.com/member.php...o&userid=30694 View this thread: http://www.excelforum.com/showthread...hreadid=570072 |
All times are GMT +1. The time now is 10:06 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com