Ready, steady… save!
You don’t need a chart to join in. Here are 2 ways to record your savings:
1. Cross it off
Pop a chart into your first post. Saved an amount? Cross it out! Read more »
£0.01 £0.02 £0.03
2. Write it down
Skip the chart and add updates to your first post. Read more »
“Another +£3 saved today. Go me!”
Use +£ before each new saving so it counts towards your total.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!
I need advice re: excel formula please
If cell A1 has the word expense in it and if cell B1 shows a negative figure in it , say -112, I want the minus sign removed from cell B1 to just then show 112
Any help will be appreciated
Comments
-
In plain english
If A1 contains expense then B1 = ABS(B1)
You don't need to test for negative values if the A1 condition is met0 -
just multiply it by -10
-
I think it may need some VBA code actually. I haven't touched VBA for about 10 years0
-
If the result is to go into a third cell, say, C1, then it's easy...
=IF(LOWER(A1)="expenses",ABS(B1),B1)
I'd add LOWER so that any case matches.0 -
You can do it with conditional formatting on cell B1, along the lines of:longforgotten wrote: »So what I want to do is this..........
If cell A1 has the word expense in it and if cell B1 shows a negative figure in it , say -112, I want the minus sign removed from cell B1 to just then show 112
Any help will be appreciated
Format values where this formula is true: =FIND("expense",A1)
Format: 0.00;0.00
Note this only alters the way the negative number is displayed, if you refer to the cell with another formula, its true value (if negative) will be used.
Also, it is case sensitive, you'd need a slightly more complex condition to get round that.
Why are expense items entered as negative anyway, or are they looked up from elsewhere?
If so, conditional formatting may not be the answer.I’m a Forum Ambassador and I support the Forum Team on the In My Home MoneySaving, Energy and Techie Stuff boards. If you need any help on these boards, do let me know. Please note that Ambassadors are not moderators. Any posts you spot in breach of the Forum Rules should be reported via the report button, or by emailing forumteam@moneysavingexpert.com.
All views are my own and not the official line of MoneySavingExpert.
0 -
Even with such a simple requirement, more info is required...0
-
That will fail if there is a rogue space or other character in the cellCornucopia wrote: »If the result is to go into a third cell, say, C1, then it's easy...
=IF(LOWER(A1)="expenses",ABS(B1),B1)
I'd add LOWER so that any case matches.
=IF(FIND("expenses",LOWER(A1))>0, ABS(B1),B1)
Deals with there being more than the word expenses in A10 -
Spot on Corn!Cornucopia wrote: »Even with such a simple requirement, more info is required...
The question needs expanding. In Excel thereare many ways to change cell b1depending on the contents of cell a1 but the best solution will be subject to the need/reason xuch as:
Do you wish to change just what is diplayed?
Do you use cell b1 in other calculations i.e. The actual value needs changing?
Is it just a one off cell change or will the test need repeating after a cell change/worksheet open/by user intervention?
Is the change for a single cell based upon that corresponding single cell or multiples of one or the other or both i.e. ranges of cells contiguous or otherwise.
I guess many of us like Corn. believe there is more to it than the outlined need otherwise you could just read cell a1 and change b1 manually!
It would help if you could add more to your original post as to what and why on how it will be used0 -
longforgotten hasn't been back to look at the replies thus far anyway...;)
I’m a Forum Ambassador and I support the Forum Team on the In My Home MoneySaving, Energy and Techie Stuff boards. If you need any help on these boards, do let me know. Please note that Ambassadors are not moderators. Any posts you spot in breach of the Forum Rules should be reported via the report button, or by emailing forumteam@moneysavingexpert.com.
All views are my own and not the official line of MoneySavingExpert.
0 -
Confirm your email address to Create Threads and Reply
Categories
- All Categories
- 355.9K Banking & Borrowing
- 254.9K Reduce Debt & Boost Income
- 456.2K Spending & Discounts
- 248.4K Work, Benefits & Business
- 606.1K Mortgages, Homes & Bills
- 179K Life & Family
- 263.9K Travel & Transport
- 1.5M Hobbies & Leisure
- 16.2K Discuss & Feedback
- 37.7K Read-Only Boards

