sshaffer99
Board Regular
- Joined
- Sep 29, 2010
- Messages
- 111
Hi,
This may be too complicated for this forum, but I thought I'd ask.
I was wondering if someone can help me to create a button which will be available on every row and populate an income or expense category based on a look-up table.
Sample of My Spreadsheet:
Row B
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Transaction[/TD]
[TD]Amount[/TD]
[TD]Expense Category[/TD]
[TD]Income Category[/TD]
[/TR]
[TR]
[TD]Button[/TD]
[TD]Patter Exxon Main[/TD]
[TD]-25.00[/TD]
[TD]Fuel[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Button[/TD]
[TD]Expo Salary[/TD]
[TD]250.00[/TD]
[TD][/TD]
[TD]Services[/TD]
[/TR]
[TR]
[TD]Button[/TD]
[TD]Broad St Outback[/TD]
[TD]-32.00[/TD]
[TD]Meals[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Button[/TD]
[TD]East Fed Ex Prime[/TD]
[TD]6.50[/TD]
[TD]Postage[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I will have a look-up table (sample below) with Keywords in the first column and a Category in the 2nd column.
In the table displayed above, Column B has transactions from a downloaded bank statement. When a button in row A is pressed, I'd like to see if B "contains" a value in the lookup table. If the keyword is found, populate D or E with the Category from the lookup table.
If the value in "C" is a positive number, populate column E with the category.
If the value in "C" is a negative number, populate column D with the category.
If D or E is already populated (not blank), do nothing (do not over-write value).
For Example,
if Column B contains "Exxon", populate Column "D" with "Fuel".
If Column B contains "Salary", populate Column "E" with "Services"
If Column B contains "Fed Ex", populate column "D" with "Postage"
Sample Look-up Table:
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]Keyword[/TD]
[TD]Category[/TD]
[/TR]
[TR]
[TD]Exxon[/TD]
[TD]Fuel[/TD]
[/TR]
[TR]
[TD]Salary[/TD]
[TD]Services[/TD]
[/TR]
[TR]
[TD]Fed Ex[/TD]
[TD]Postage[/TD]
[/TR]
</tbody>[/TABLE]
I know how to create a button in Column A, and I know how to create some very basic code for the button, but need help with the above.
Thanks in advance!
This may be too complicated for this forum, but I thought I'd ask.
I was wondering if someone can help me to create a button which will be available on every row and populate an income or expense category based on a look-up table.
Sample of My Spreadsheet:
Row B
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Transaction[/TD]
[TD]Amount[/TD]
[TD]Expense Category[/TD]
[TD]Income Category[/TD]
[/TR]
[TR]
[TD]Button[/TD]
[TD]Patter Exxon Main[/TD]
[TD]-25.00[/TD]
[TD]Fuel[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Button[/TD]
[TD]Expo Salary[/TD]
[TD]250.00[/TD]
[TD][/TD]
[TD]Services[/TD]
[/TR]
[TR]
[TD]Button[/TD]
[TD]Broad St Outback[/TD]
[TD]-32.00[/TD]
[TD]Meals[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Button[/TD]
[TD]East Fed Ex Prime[/TD]
[TD]6.50[/TD]
[TD]Postage[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I will have a look-up table (sample below) with Keywords in the first column and a Category in the 2nd column.
In the table displayed above, Column B has transactions from a downloaded bank statement. When a button in row A is pressed, I'd like to see if B "contains" a value in the lookup table. If the keyword is found, populate D or E with the Category from the lookup table.
If the value in "C" is a positive number, populate column E with the category.
If the value in "C" is a negative number, populate column D with the category.
If D or E is already populated (not blank), do nothing (do not over-write value).
For Example,
if Column B contains "Exxon", populate Column "D" with "Fuel".
If Column B contains "Salary", populate Column "E" with "Services"
If Column B contains "Fed Ex", populate column "D" with "Postage"
Sample Look-up Table:
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]Keyword[/TD]
[TD]Category[/TD]
[/TR]
[TR]
[TD]Exxon[/TD]
[TD]Fuel[/TD]
[/TR]
[TR]
[TD]Salary[/TD]
[TD]Services[/TD]
[/TR]
[TR]
[TD]Fed Ex[/TD]
[TD]Postage[/TD]
[/TR]
</tbody>[/TABLE]
I know how to create a button in Column A, and I know how to create some very basic code for the button, but need help with the above.
Thanks in advance!