looking for a way to repeat a formula pattern within a cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm looking for a way to get this formula to continue on changing value every
10 numbers but only increasing 2 numbers in the result.

=IF(C7<=19,"4",IF(C7<=29,"6",IF(C7<=39,"8",IF(C7<=49,"10",IF(C7<=59,"12",IF(C7<=69,"14",IF(C7<=79,"16",IF(C7<=89,"18",))))))))

I need an expert in writing code
 
Hi dla,

will u try this formula?
=2*(LEFT(C1,IF(LEN(C1)=1,1,LEN(C1)-1))+1)

the difference from your sample is if C7=0, answer here is 2...
assume all positive numbers on C7 only
regards
 
Try =4+2*CEILING((MAX(C7-19,0)/10),1)

Did you actually want text strings (as you've put the numbers in quotes)?
I've assumed you probably wanted real numbers?
 
Have you tested your formula with values like 2, 3, 4, 5, 6, 7, 8 and 9 respectively in C1?

Epinn

Hi dla,

will u try this formula?
=2*(LEFT(C1,IF(LEN(C1)=1,1,LEN(C1)-1))+1)

the difference from your sample is if C7=0, answer here is 2...
assume all positive numbers on C7 only
regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top