If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
HELP - Date Range In 1 Cell Calculation
Hello,
I have one cell where i enter a date 8/30/2005 (which resides in A3). And i need another cell to display a date range based on the above date. The date range will always be the same number of days apart. For example the date range will always be 2-7 days from the entered above date. What i did so far was 2 seperate calculations in 2 different cells. One for the low end (=SUM(A3+2) and one for the high end =SUM(A3+7). Then I put =(B3) & " " & "through" & " " & (C3) in the third cell where i want the range to appear. But what happens is it comes out like: 38596 through 38599 How can i get the dates to remain in date format even though there is text between them??? |
#2
|
|||
|
|||
No need for SUM
=A3+2 =A3+7 =TEXT(B3,"m/d/yyy")&" through "&TEXT(C3,"m/d/yyyy") -- HTH Bob Phillips "Adam" wrote in message ... Hello, I have one cell where i enter a date 8/30/2005 (which resides in A3). And i need another cell to display a date range based on the above date. The date range will always be the same number of days apart. For example the date range will always be 2-7 days from the entered above date. What i did so far was 2 seperate calculations in 2 different cells. One for the low end (=SUM(A3+2) and one for the high end =SUM(A3+7). Then I put =(B3) & " " & "through" & " " & (C3) in the third cell where i want the range to appear. But what happens is it comes out like: 38596 through 38599 How can i get the dates to remain in date format even though there is text between them??? |
#3
|
|||
|
|||
Thanks Bob that worked great!
I got one more question: What if my date range result lands on a weekend and i don't want it to? Is there a way that i can identify and check that that the result is a weekend and if it is move the range to the next earliest range? If possible please use my work email as well ). Thanks. "Bob Phillips" wrote: No need for SUM =A3+2 =A3+7 =TEXT(B3,"m/d/yyy")&" through "&TEXT(C3,"m/d/yyyy") -- HTH Bob Phillips "Adam" wrote in message ... Hello, I have one cell where i enter a date 8/30/2005 (which resides in A3). And i need another cell to display a date range based on the above date. The date range will always be the same number of days apart. For example the date range will always be 2-7 days from the entered above date. What i did so far was 2 seperate calculations in 2 different cells. One for the low end (=SUM(A3+2) and one for the high end =SUM(A3+7). Then I put =(B3) & " " & "through" & " " & (C3) in the third cell where i want the range to appear. But what happens is it comes out like: 38596 through 38599 How can i get the dates to remain in date format even though there is text between them??? |
#4
|
|||
|
|||
Now you know that you can g
=TEXT(IF(WEEKDAY(B3,2)6,B3,B3+(8-WEEKDAY(B3,2))),"m/d/yyy")&" through "&TEXT(IF(WEEKDAY(C3,2)6,C3,C3+(8-WEEKDAY(C3,2))),"m/d/yyyy") -- HTH Bob Phillips "Adam" wrote in message ... Thanks Bob that worked great! I got one more question: What if my date range result lands on a weekend and i don't want it to? Is there a way that i can identify and check that that the result is a weekend and if it is move the range to the next earliest range? If possible please use my work email as well ). Thanks. "Bob Phillips" wrote: No need for SUM =A3+2 =A3+7 =TEXT(B3,"m/d/yyy")&" through "&TEXT(C3,"m/d/yyyy") -- HTH Bob Phillips "Adam" wrote in message ... Hello, I have one cell where i enter a date 8/30/2005 (which resides in A3). And i need another cell to display a date range based on the above date. The date range will always be the same number of days apart. For example the date range will always be 2-7 days from the entered above date. What i did so far was 2 seperate calculations in 2 different cells. One for the low end (=SUM(A3+2) and one for the high end =SUM(A3+7). Then I put =(B3) & " " & "through" & " " & (C3) in the third cell where i want the range to appear. But what happens is it comes out like: 38596 through 38599 How can i get the dates to remain in date format even though there is text between them??? |
#5
|
|||
|
|||
Hello Bob,
I used your earlier suggestion of not using the sum and did =TEXT(B3,"m/d/yyy")&" through "&TEXT(C3,"m/d/yyyy") instead. I just modified it a little to say: =TEXT(B3-7,"m/d/yyy")&" through "&TEXT(B3-2,"m/d/yyyy") This allowed me to use only one cell instead of 2. Then when you sent me the response to my "check and avoid the weekend" question the formula did not work. I think because the original solution was using 2 cells to figure out the range instead of 1 ex: =TEXT(B3,"m/d/yyy")&" through "&TEXT(C3,"m/d/yyyy") Is there any way to change =TEXT(IF(WEEKDAY(B3,2)6,B3,B3+(8-WEEKDAY(B3,2))),"m/d/yyy")&" through "&TEXT(IF(WEEKDAY(C3,2)6,C3,C3+(8-WEEKDAY(C3,2))),"m/d/yyyy") to refer only to one cell. I'm trying only referenceing one cell but it is not working, I may be using the function wrong or fully understand how the arguments work??? Help if possible.. "Bob Phillips" wrote: Now you know that you can g =TEXT(IF(WEEKDAY(B3,2)6,B3,B3+(8-WEEKDAY(B3,2))),"m/d/yyy")&" through "&TEXT(IF(WEEKDAY(C3,2)6,C3,C3+(8-WEEKDAY(C3,2))),"m/d/yyyy") -- HTH Bob Phillips "Adam" wrote in message ... Thanks Bob that worked great! I got one more question: What if my date range result lands on a weekend and i don't want it to? Is there a way that i can identify and check that that the result is a weekend and if it is move the range to the next earliest range? If possible please use my work email as well ). Thanks. "Bob Phillips" wrote: No need for SUM =A3+2 =A3+7 =TEXT(B3,"m/d/yyy")&" through "&TEXT(C3,"m/d/yyyy") -- HTH Bob Phillips "Adam" wrote in message ... Hello, I have one cell where i enter a date 8/30/2005 (which resides in A3). And i need another cell to display a date range based on the above date. The date range will always be the same number of days apart. For example the date range will always be 2-7 days from the entered above date. What i did so far was 2 seperate calculations in 2 different cells. One for the low end (=SUM(A3+2) and one for the high end =SUM(A3+7). Then I put =(B3) & " " & "through" & " " & (C3) in the third cell where i want the range to appear. But what happens is it comes out like: 38596 through 38599 How can i get the dates to remain in date format even though there is text between them??? |
#6
|
|||
|
|||
Hi Adam,
How about this =TEXT(IF(WEEKDAY(A3+2,2)6,A3+2,A3+2+(8-WEEKDAY(A3+2,2))),"m/d/yyy")&" through "&TEXT(IF(WEEKDAY(A3+7,2)6,A3+7,A3+7+(8-WEEKDAY(A3+7,2))),"m/d/yyyy") -- HTH Bob Phillips "Adam" wrote in message ... Hello Bob, I used your earlier suggestion of not using the sum and did =TEXT(B3,"m/d/yyy")&" through "&TEXT(C3,"m/d/yyyy") instead. I just modified it a little to say: =TEXT(B3-7,"m/d/yyy")&" through "&TEXT(B3-2,"m/d/yyyy") This allowed me to use only one cell instead of 2. Then when you sent me the response to my "check and avoid the weekend" question the formula did not work. I think because the original solution was using 2 cells to figure out the range instead of 1 ex: =TEXT(B3,"m/d/yyy")&" through "&TEXT(C3,"m/d/yyyy") Is there any way to change =TEXT(IF(WEEKDAY(B3,2)6,B3,B3+(8-WEEKDAY(B3,2))),"m/d/yyy")&" through "&TEXT(IF(WEEKDAY(C3,2)6,C3,C3+(8-WEEKDAY(C3,2))),"m/d/yyyy") to refer only to one cell. I'm trying only referenceing one cell but it is not working, I may be using the function wrong or fully understand how the arguments work??? Help if possible.. "Bob Phillips" wrote: Now you know that you can g =TEXT(IF(WEEKDAY(B3,2)6,B3,B3+(8-WEEKDAY(B3,2))),"m/d/yyy")&" through "&TEXT(IF(WEEKDAY(C3,2)6,C3,C3+(8-WEEKDAY(C3,2))),"m/d/yyyy") -- HTH Bob Phillips "Adam" wrote in message ... Thanks Bob that worked great! I got one more question: What if my date range result lands on a weekend and i don't want it to? Is there a way that i can identify and check that that the result is a weekend and if it is move the range to the next earliest range? If possible please use my work email as well ). Thanks. "Bob Phillips" wrote: No need for SUM =A3+2 =A3+7 =TEXT(B3,"m/d/yyy")&" through "&TEXT(C3,"m/d/yyyy") -- HTH Bob Phillips "Adam" wrote in message ... Hello, I have one cell where i enter a date 8/30/2005 (which resides in A3). And i need another cell to display a date range based on the above date. The date range will always be the same number of days apart. For example the date range will always be 2-7 days from the entered above date. What i did so far was 2 seperate calculations in 2 different cells. One for the low end (=SUM(A3+2) and one for the high end =SUM(A3+7). Then I put =(B3) & " " & "through" & " " & (C3) in the third cell where i want the range to appear. But what happens is it comes out like: 38596 through 38599 How can i get the dates to remain in date format even though there is text between them??? |
#7
|
|||
|
|||
This is working - at least to some extent...I'm trying to test it but i think
i'm confusing myself. Sorry to be such a pain but let me give you this hypthetical situation and let me if the below formula would work because right not it's still giving me date ranges that include a weekend. My real life cell that I'm using is J30. I'm entering August 25th in there, but my range result is 8/18 - 8/23 which include the 20th and 21st (sat and sun). When i enter the 25th (or any date) and the range lands on a weekend like this example, i want to skip around it. I tried using 2-5 day range instead of 2-7 but it didn't help. It looks like its checking the range result but not moving it once it changes??? "Bob Phillips" wrote: Hi Adam, How about this =TEXT(IF(WEEKDAY(A3+2,2)6,A3+2,A3+2+(8-WEEKDAY(A3+2,2))),"m/d/yyy")&" through "&TEXT(IF(WEEKDAY(A3+7,2)6,A3+7,A3+7+(8-WEEKDAY(A3+7,2))),"m/d/yyyy") -- HTH Bob Phillips "Adam" wrote in message ... Hello Bob, I used your earlier suggestion of not using the sum and did =TEXT(B3,"m/d/yyy")&" through "&TEXT(C3,"m/d/yyyy") instead. I just modified it a little to say: =TEXT(B3-7,"m/d/yyy")&" through "&TEXT(B3-2,"m/d/yyyy") This allowed me to use only one cell instead of 2. Then when you sent me the response to my "check and avoid the weekend" question the formula did not work. I think because the original solution was using 2 cells to figure out the range instead of 1 ex: =TEXT(B3,"m/d/yyy")&" through "&TEXT(C3,"m/d/yyyy") Is there any way to change =TEXT(IF(WEEKDAY(B3,2)6,B3,B3+(8-WEEKDAY(B3,2))),"m/d/yyy")&" through "&TEXT(IF(WEEKDAY(C3,2)6,C3,C3+(8-WEEKDAY(C3,2))),"m/d/yyyy") to refer only to one cell. I'm trying only referenceing one cell but it is not working, I may be using the function wrong or fully understand how the arguments work??? Help if possible.. "Bob Phillips" wrote: Now you know that you can g =TEXT(IF(WEEKDAY(B3,2)6,B3,B3+(8-WEEKDAY(B3,2))),"m/d/yyy")&" through "&TEXT(IF(WEEKDAY(C3,2)6,C3,C3+(8-WEEKDAY(C3,2))),"m/d/yyyy") -- HTH Bob Phillips "Adam" wrote in message ... Thanks Bob that worked great! I got one more question: What if my date range result lands on a weekend and i don't want it to? Is there a way that i can identify and check that that the result is a weekend and if it is move the range to the next earliest range? If possible please use my work email as well ). Thanks. "Bob Phillips" wrote: No need for SUM =A3+2 =A3+7 =TEXT(B3,"m/d/yyy")&" through "&TEXT(C3,"m/d/yyyy") -- HTH Bob Phillips "Adam" wrote in message ... Hello, I have one cell where i enter a date 8/30/2005 (which resides in A3). And i need another cell to display a date range based on the above date. The date range will always be the same number of days apart. For example the date range will always be 2-7 days from the entered above date. What i did so far was 2 seperate calculations in 2 different cells. One for the low end (=SUM(A3+2) and one for the high end =SUM(A3+7). Then I put =(B3) & " " & "through" & " " & (C3) in the third cell where i want the range to appear. But what happens is it comes out like: 38596 through 38599 How can i get the dates to remain in date format even though there is text between them??? |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Copy Cat Ain't Working | shep | Setting Up & Running Reports | 15 | September 12th, 2005 05:14 PM |
Help PLEASE! Not sure what answer is: Match? Index? Other? | baz | Worksheet Functions | 7 | September 3rd, 2005 03:47 PM |
Possible Lookup Table | Karen | Worksheet Functions | 5 | June 8th, 2005 09:43 PM |
Query for 'confirmation' | rogge | Running & Setting Up Queries | 8 | April 19th, 2005 03:26 PM |
Formula help | Wally | Worksheet Functions | 6 | December 5th, 2003 01:18 PM |