![]() |
#1
|
|||
|
|||
![]()
This may sound a little odd, but I would like a single cell to display two figures in the following format: + 19 + 1 Both plus (+) signs need to be displayed.
Then, in an adjacent cell I would like to sum the first cell and divide it thus: =B69/4 The answer in this hypothetical example should be "5", but no plus sign should appear in this case. My efforts today give me a result of, "#value" Can I get it to do what I want? Thanks for any help. |
#2
|
||||
|
||||
![]()
As the two figures in one cell constitute a text string, VBA will probably be needed.
What are you trying to do?
__________________
Using O365 v2503 - Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post |
#3
|
|||
|
|||
![]()
Yes, I do want it to read like text, but I also want it to sum in another column. If VBA is simply achieved I might give it a go, but if it's too complicated I may have to just write the answer manually.
|
#4
|
|||
|
|||
![]()
Maybe, with + 19 + 1 in A1...
=SUM((TRIM(MID(SUBSTITUTE(A1,"+",REPT(" ",255)),1+(ROW(A1:A200)-1)*255,255)) & "0")/10) IMPORTANT
|
#5
|
|||
|
|||
![]()
That worked well Jeffrey, but I omitted mentioning in the opening post that I wanted to add another cell at the same time. So, I inserted it into your code as follows:
Code:
=(SUM((TRIM(MID(SUBSTITUTE(B75,"+",REPT(" ",255)),1+(ROW(A1:A200)-1)*255,255)) & "0")/10)+SUM((TRIM(MID(SUBSTITUTE(B76,"+",REPT(" ",255)),1+(ROW(A1:A200)-1)*255,255)) & "0")/10))/29.5306 Incidentally, my project relates to a soli-lunar calendar. |
#6
|
|||
|
|||
![]()
Please provide what exactly is in B75 and what is in B76!
Also, what do you expect as the answer? My thought, use the formula provided for answers in two separate cells and then as an example... =(C75+C76)/29.5306 If there is only one number in B76, then not sure we need the first formula, but once you tell us what is in B76 then we can get something to work. |
#7
|
|||
|
|||
![]()
B75 reads "+1279 + 1"
B76 reads "+1290" F75 should read "87 months" in other words, 1279 days, plus 1 day, plus 1290 days equals 2570 days. Divide that by a lunar month (29.5306 days) equals 87.0284 months. I have custom formatted F75 to leave out the decimal points and to place "87 months" but I cannot automatically add up to 87. Also, I need to fill down the "F" column so that this formula keeps repeating adjacent to its respective cells in "B" column. |
#8
|
|||
|
|||
![]()
Try...
Code:
----B---- C D E ----F---- 75 +1279 + 1 87 Months 76 +1290 IMPORTANT
Custom Format >> F75
Quote:
If so, you can just copy F75 and paste into F77. How far down do you need to copy? How many results did you need? |
#9
|
|||
|
|||
![]() Quote:
Quote:
Thanks for your good help. I have filled down for 50 results and it works like a charm. |
#10
|
|||
|
|||
![]()
You are most welcome and thanks for the feedback.
If you are going to have about 210 instances of the formula, you should adjust... ROW($A$1:$A$200) >> to >> ROW($A$1:$A$300) 300 just puts you on the safe side. |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
H28Sailor | Excel | 6 | 01-09-2017 06:00 AM |
![]() |
shabbaranks | Excel | 17 | 05-13-2014 06:47 PM |
![]() |
iuliandonici | Excel | 1 | 04-13-2011 09:45 PM |
![]() |
iuliandonici | Excel | 4 | 04-13-2011 09:27 PM |
![]() |
Learner7 | Excel | 1 | 07-19-2010 10:06 AM |