Using a variable in a formula

ingasos

New Member
Joined
Oct 3, 2019
Messages
7
I've seen a similar question to the append with the heading of "Using a variable in a formula", but I can't fine the correct syntax for my particular problem which is as follows:

=DATE(YEAR(summary_start_date)+1,MONTH(summary_start_date),DAY(summary_start_date))


I want to change the + part where it says +1 to a variable called year_asc_dec which could either be a + or a - so I would end up with +1 or -1 in the above formula.

Any thoughts or suggestions. Basically a want to produce a date table which is either descending or ascending from a given start date.


Thanks in advance for any thoughts
Siggi
 
Not a problem, It's sometimes difficult to describe the problem and in many cases difficult to understand what is actually being asked.
That said, thanks for your suggestion.

I have one last problem to address and then I can use my database. It's a separate problem which has nothing to do with formulas. I have created a table for my glider / soaring flights, When I use the form option I get the following error "Cannot Extend table or database" I can see that a number of people have had the same problem and I have checked and deleted any data below the last record but I have not found the solution for this one yet. I wanted to sort out the formula problem first which is now done so now onto this one. Input and copy and past works but not using the form "new" option.

Siggi

Siggi
 
Upvote 0

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Not a problem, It's sometimes difficult to describe the problem and in many cases difficult to understand what is actually being asked.
In re-reading it, your question was pretty clear. I just read it too fast (early in the morning, the brain wasn't firing on all cylinders yet!).

I have one last problem to address and then I can use my database. It's a separate problem which has nothing to do with formulas. I have created a table for my glider / soaring flights, When I use the form option I get the following error "Cannot Extend table or database" I can see that a number of people have had the same problem and I have checked and deleted any data below the last record but I have not found the solution for this one yet. I wanted to sort out the formula problem first which is now done so now onto this one. Input and copy and past works but not using the form "new" option.
The general rule of thumb is to post all new, unrelated questions to new threads. That way, they will appear to be new, unanswered questions. You only want to post follow-up questions to the same thread if it is a continuation of the previous question, where one needs knowledge of the prior question to answer the new one.
 
Upvote 0
Hi,
yep, I understand. I'm going to try and find the solution myself first and then if I get stuck I'll add a new subject and append on that topic.'
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,853
Members
452,361
Latest member
d3ad3y3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top