View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Miguel Zapico Miguel Zapico is offline
external usenet poster
 
Posts: 95
Default Compare to table

You can write an IF function and then drag it all accross the column. If you
have data in columns A and B, the generated number in column C, and you want
to put the formula in column D, you can write something like this in cell D1:
=IF(AND(C1A1,C1<A2),B1,"No")
And then select that cell and double click on the small square on the bottom
right corner of the cell border. Excell will fill the formula on the column
for all the cells that have something on column C, and the references will
change accordingly.

Hope this helps,
Miguel.

"spxer" wrote:


Hello. I am green to Excel, but I am trying to create a worksheet for my
own use. I have written a 2 column table of calculated numbers. Now I
have another number generated that I wish to compare to the first
column in the table. The generated number will not be an exact match.
If the generated number is greater than a first column number but less
than the next first column number, I wish to return the associated 2nd
column number. Is this possible? There will be over 1000 numbers to
compare. Is there one single string of code that will work for all
comparisons? I can write this with if statements, but each cell is
unique and I don't think I will live long enough to write 1000 cell.
Thanks


--
spxer
------------------------------------------------------------------------
spxer's Profile: http://www.excelforum.com/member.php...o&userid=37025
View this thread: http://www.excelforum.com/showthread...hreadid=567497