Jon von der Heyden
MrExcel MVP, Moderator
- Joined
- Apr 6, 2004
- Messages
- 10,907
- Office Version
- 365
- Platform
- Windows
Hi,
I have a query running or a table of orders. All orders have order dates, what I want to do is return all orders from yesterday. What do I use for the criteria? I tried now()-1 but it returned nothing.
Also, I don't know if it's possible but I would like to add a new column into the query that assigns codes based on criteria. I have two particular fields from the table that I am querying - revenue and margin. I would like the new column to assign codes to each of the records as follows:
A - If margin/revenue is less than 11% and greater than 8%.
B - If margin/revenue is less than 8% and greater than 3%
C - If margin/revenue is less than 3%
I'm not really interested in any records that do not fall within the ABC criteria.
I would be fine doing this in Excel but I have in excess of 80000 records.
Thanks,
Jon
I have a query running or a table of orders. All orders have order dates, what I want to do is return all orders from yesterday. What do I use for the criteria? I tried now()-1 but it returned nothing.
Also, I don't know if it's possible but I would like to add a new column into the query that assigns codes based on criteria. I have two particular fields from the table that I am querying - revenue and margin. I would like the new column to assign codes to each of the records as follows:
A - If margin/revenue is less than 11% and greater than 8%.
B - If margin/revenue is less than 8% and greater than 3%
C - If margin/revenue is less than 3%
I'm not really interested in any records that do not fall within the ABC criteria.
I would be fine doing this in Excel but I have in excess of 80000 records.
Thanks,
Jon