sql like statment in excel

  • Thread starter Thread starter Manual Labor
  • Start date Start date
M

Manual Labor

I need to do the following:

If cell on first sheet is equal to corresponding cell on second sheet AND
different cell on first sheet is greater than corresponding cell on second
sheet THEN another cell on first sheet is set to value from second sheet.

Is there any way to do sql in excel?

thanks
 
Hi

Try using IF() and AND() together:

=IF(AND(cell1=cell2,cell3>cell4),cell5,"")

Andy.
 
Hi Manual,

Would this work for you?:

=IF(AND(Sheet1!A1=Sheet2!A1,Sheet1!B1>Sheet2!B1),Sheet2!B1,"")

Put this formula into the cell you want to set the value of.

(obviously, the cell ref's are just examples)

Gabhan Berry
AI Prediction and Forecasting in Excel
http://www.pececillo.com
 
You can query a closed Excel workbook using SQL, ADO and the MS OLEDB
Provider for Jet. However, if the workbook is open (e.g. the active
workbook or the workbook containing the ADO code) you'll suffer with
the memory leak bug (MSDN Q319998).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top