Board index » Help Help » Technical Support




Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Excel formula.
PostPosted: Mon Oct 30, 2006 4:24 pm 
Offline
User avatar
Needs to start paying for bandwidth
 Profile

Joined: Fri Sep 02, 2005 5:20 am
Posts: 31173
Does anyone know how to go about creating a formula in Excel that would convert a cell saying 1-100

into a cell saying 1, 2, 3, 4, 5 (etc. until it has reached 100)

thanks!


Top
 
 Post subject: Re: Excel formula.
PostPosted: Mon Oct 30, 2006 4:32 pm 
Offline
User avatar
In a van down by the river
 Profile

Joined: Sun Oct 17, 2004 6:15 am
Posts: 33031
conoalias wrote:
Does anyone know how to go about creating a formula in Excel that would convert a cell saying 1-100

into a cell saying 1, 2, 3, 4, 5 (etc. until it has reached 100)

thanks!


cell a1

1

cell a2

=A1+1

drag cell a2 to cells a3-a100

done

_________________
maybe we can hum along...


Top
 
 Post subject: Re: Excel formula.
PostPosted: Mon Oct 30, 2006 4:36 pm 
Offline
User avatar
Needs to start paying for bandwidth
 Profile

Joined: Fri Sep 02, 2005 5:20 am
Posts: 31173
Peeps wrote:
conoalias wrote:
Does anyone know how to go about creating a formula in Excel that would convert a cell saying 1-100

into a cell saying 1, 2, 3, 4, 5 (etc. until it has reached 100)

thanks!


cell a1

1

cell a2

=A1+1

drag cell a2 to cells a3-a100

done


:lol:

i know that one, what i'm trying to do is to put all those values (1 thru 100) into ONE cell with a comma space seperating them.


Top
 
 Post subject:
PostPosted: Mon Oct 30, 2006 4:39 pm 
Offline
User avatar
Needs to start paying for bandwidth
 Profile

Joined: Fri Sep 02, 2005 5:20 am
Posts: 31173
like this:

Image


Top
 
 Post subject:
PostPosted: Mon Oct 30, 2006 5:00 pm 
Offline
User avatar
Administrator
 Profile

Joined: Sat Oct 16, 2004 10:51 pm
Posts: 14534
Location: Mesa,AZ
I'll see if I can do it, possibly with a macro? hmm

_________________
John Adams wrote:
In my many years I have come to a conclusion that one useless man is a shame, two is a law firm, and three or more is a congress.


Top
 
 Post subject:
PostPosted: Mon Oct 30, 2006 5:09 pm 
Offline
User avatar
Needs to start paying for bandwidth
 Profile

Joined: Fri Sep 02, 2005 5:20 am
Posts: 31173
$úñ_DëV|L wrote:
I'll see if I can do it, possibly with a macro? hmm


you'd be my hero.


Top
 
 Post subject:
PostPosted: Mon Oct 30, 2006 5:52 pm 
Offline
User avatar
Administrator
 Profile

Joined: Sat Oct 16, 2004 10:51 pm
Posts: 14534
Location: Mesa,AZ
1. Go to Tools -> Macros -> Visual Basic Editor
2. In Visual Basic Editor, go to Insert -> New Module

In the window that comes up, enter this:
Code:
Function List(Num1, Num2)
    Rtn = "" + CStr(Num1)
    i = Num1 + 1
    While i <= Num2
        Rtn = Rtn + "," + CStr(i)
        i = i + 1
    Wend
    List = Rtn
End Function



Save and close Visual Basic Editor.

3. Enter this in the cell you want the list to appear in:
Code:
=LIST(VALUE(LEFT(D7,FIND("-",D7,1)-1)),VALUE(RIGHT(D7,LEN(D7)-FIND("-",D7,1))))

Except replace "D7" with whatever the cell with the "m-n" value is in.

_________________
John Adams wrote:
In my many years I have come to a conclusion that one useless man is a shame, two is a law firm, and three or more is a congress.


Top
 
 Post subject:
PostPosted: Mon Oct 30, 2006 6:02 pm 
Offline
User avatar
Needs to start paying for bandwidth
 Profile

Joined: Fri Sep 02, 2005 5:20 am
Posts: 31173
$úñ_DëV|L wrote:
1. Go to Tools -> Macros -> Visual Basic Editor
2. In Visual Basic Editor, go to Insert -> New Module

In the window that comes up, enter this:
Code:
Function List(Num1, Num2)
    Rtn = "" + CStr(Num1)
    i = Num1 + 1
    While i <= Num2
        Rtn = Rtn + "," + CStr(i)
        i = i + 1
    Wend
    List = Rtn
End Function



Save and close Visual Basic Editor.

3. Enter this in the cell you want the list to appear in:
Code:
=LIST(VALUE(LEFT(D7,FIND("-",D7,1)-1)),VALUE(RIGHT(D7,LEN(D7)-FIND("-",D7,1))))

Except replace "D7" with whatever the cell with the "m-n" value is in.


thanks so much for trying to help me out, but it doesn't work...


Top
 
 Post subject:
PostPosted: Mon Oct 30, 2006 6:14 pm 
Offline
User avatar
Administrator
 Profile

Joined: Sat Oct 16, 2004 10:51 pm
Posts: 14534
Location: Mesa,AZ
conoalias wrote:
$úñ_DëV|L wrote:
1. Go to Tools -> Macros -> Visual Basic Editor
2. In Visual Basic Editor, go to Insert -> New Module

In the window that comes up, enter this:
Code:
Function List(Num1, Num2)
    Rtn = "" + CStr(Num1)
    i = Num1 + 1
    While i <= Num2
        Rtn = Rtn + "," + CStr(i)
        i = i + 1
    Wend
    List = Rtn
End Function



Save and close Visual Basic Editor.

3. Enter this in the cell you want the list to appear in:
Code:
=LIST(VALUE(LEFT(D7,FIND("-",D7,1)-1)),VALUE(RIGHT(D7,LEN(D7)-FIND("-",D7,1))))

Except replace "D7" with whatever the cell with the "m-n" value is in.


thanks so much for trying to help me out, but it doesn't work...


Are macros enabled? Did you replace all the occurrences of "D7" with the correct cell?

Try just entering "=LIST(1,10)" in a cell and see if it works. If that doesn't work, then it's either a security setting or something went wrong entering the code.

_________________
John Adams wrote:
In my many years I have come to a conclusion that one useless man is a shame, two is a law firm, and three or more is a congress.


Top
 
 Post subject:
PostPosted: Mon Oct 30, 2006 6:25 pm 
Offline
User avatar
Needs to start paying for bandwidth
 Profile

Joined: Fri Sep 02, 2005 5:20 am
Posts: 31173
its working now :D :D :D thanks so much man!!

a question though; will this also work if the cell for example is like this:

1, 3, 5, 7-10, 11, 12-14, 16 ? or does the orginal cell have to be value-value?

also i need a comma space instead of just a comma

Code:
Function List(Num1, Num2)
    Rtn = "" + CStr(Num1)
    i = Num1 + 1
    While i <= Num2
        Rtn = Rtn + "," + " "+ CStr(i)
        i = i + 1
    Wend
    List = Rtn
End Function


would that fix that issue?


Top
 
 Post subject:
PostPosted: Mon Oct 30, 2006 6:30 pm 
Offline
User avatar
Administrator
 Profile

Joined: Sat Oct 16, 2004 10:51 pm
Posts: 14534
Location: Mesa,AZ
conoalias wrote:
its working now :D :D :D thanks so much man!!

a question though; will this also work if the cell for example is like this:

1, 3, 5, 7-10, 11, 12-14, 16 ? or does the orginal cell have to be value-value?

also i need a comma space instead of just a comma

Code:
Function List(Num1, Num2)
    Rtn = "" + CStr(Num1)
    i = Num1 + 1
    While i <= Num2
        Rtn = Rtn + "," + " "+ CStr(i)
        i = i + 1
    Wend
    List = Rtn
End Function


would that fix that issue?


That would fix if, or you could just put the space right between the comma and end quote.

And it will only work for "value-value".

_________________
John Adams wrote:
In my many years I have come to a conclusion that one useless man is a shame, two is a law firm, and three or more is a congress.


Top
 
 Post subject:
PostPosted: Mon Oct 30, 2006 6:33 pm 
Offline
User avatar
Needs to start paying for bandwidth
 Profile

Joined: Fri Sep 02, 2005 5:20 am
Posts: 31173
$úñ_DëV|L wrote:
conoalias wrote:
its working now :D :D :D thanks so much man!!

a question though; will this also work if the cell for example is like this:

1, 3, 5, 7-10, 11, 12-14, 16 ? or does the orginal cell have to be value-value?

also i need a comma space instead of just a comma

Code:
Function List(Num1, Num2)
    Rtn = "" + CStr(Num1)
    i = Num1 + 1
    While i <= Num2
        Rtn = Rtn + "," + " "+ CStr(i)
        i = i + 1
    Wend
    List = Rtn
End Function


would that fix that issue?


That would fix if, or you could just put the space right between the comma and end quote.

And it will only work for "value-value".


oh man this is gonna help me so much, thanks so much $úñ_DëV|L.


Top
 
 Post subject:
PostPosted: Tue Oct 31, 2006 12:09 am 
Offline
User avatar
Spaceman
 Profile

Joined: Mon Oct 18, 2004 1:03 am
Posts: 24177
Location: Australia
$úñ_DëV|L is wicked smart.

_________________
Oh, the flowers of indulgence and the weeds of yesteryear,
Like criminals, they have choked the breath of conscience and good cheer.
The sun beat down upon the steps of time to light the way
To ease the pain of idleness and the memory of decay.


Top
 
 Post subject:
PostPosted: Tue Oct 31, 2006 1:46 am 
Offline
User avatar
Needs to start paying for bandwidth
 Profile

Joined: Fri Sep 02, 2005 5:20 am
Posts: 31173
vacatetheword wrote:
$úñ_DëV|L is wicked smart.


Top
 
 Post subject:
PostPosted: Wed Feb 21, 2007 9:53 pm 
Offline
User avatar
Needs to start paying for bandwidth
 Profile

Joined: Fri Sep 02, 2005 5:20 am
Posts: 31173
and we're back.

right now i have a formula like this:

Quote:
=IF(CK4=$F4,$A$1,IF(CK4=$N4,$I$1,IF(CK4=$X4,$Q$1,IF(CK4=$AF4,$AA$1,IF(CK4=$AN4,$AI$1,IF(CK4=$BJ4,$BE$1,IF(CK4=$BR4,$BM$1,IF(CK4=$CA4,$BU$1,"N/A"))))))))


and it works perfectly fine.

but some new columns were added to the spreadsheet, so i have to edit the formula, like such: (new part is in red, part that doesn't work in blue )

Quote:
=IF(CK3=$F3,$A$1,IF(CK3=$N3,$I$1,IF(CK3=$X3,$Q$1,IF(CK3=$AF3,$AA$1,IF(CK3=$AN3,$AI$1,IF(CK3=$AW3,$AQ$1,IF(CK3=$BJ3,$BE$1,IF(CK3=$BR3,$BM$1,IF(CK3=$CA3,$BU$1,"N/A")))))))))


but like i said the blue part is fucking up the formula, at least that's what excel says.

Me and a bunch of co workers have been working on this now and even rebuild the formula from scratch, but it won't work. it keeps ignoring the blue part.

anyone have an idea?


Top
 
 Post subject:
PostPosted: Thu Feb 22, 2007 2:40 am 
Offline
User avatar
Needs to start paying for bandwidth
 Profile

Joined: Fri Sep 02, 2005 5:20 am
Posts: 31173
yeah that's it, keep them coming. :D


Top
 
 Post subject:
PostPosted: Thu Feb 22, 2007 9:48 pm 
Offline
User avatar
Needs to start paying for bandwidth
 Profile

Joined: Fri Sep 02, 2005 5:20 am
Posts: 31173
i found a way around it, but for future reference i'd love some suggestions(/a suggestion). :)


Top
 
 Post subject:
PostPosted: Thu Feb 22, 2007 9:51 pm 
Offline
User avatar
Administrator
 WWW  Profile

Joined: Sat Oct 16, 2004 7:44 pm
Posts: 8910
Location: Santa Cruz
Gender: Male
conoalias wrote:
i found a way around it, but for future reference i'd love some suggestions(/a suggestion). :)


Image

Sorry bro. I hate excel, and I hate formulas :lol:

</END THERMONUCLEAR DEVICE>


Top
 
 Post subject:
PostPosted: Thu Feb 22, 2007 9:58 pm 
Offline
User avatar
Needs to start paying for bandwidth
 Profile

Joined: Fri Sep 02, 2005 5:20 am
Posts: 31173
that's cool. i love anything number/formula related, which is why i'm so frustrated that i can't figure it out. :x


Top
 
 Post subject:
PostPosted: Fri Feb 23, 2007 2:55 am 
Offline
User avatar
Administrator
 Profile

Joined: Sat Oct 16, 2004 10:51 pm
Posts: 14534
Location: Mesa,AZ
First of all, the formula is not using a circular reference is it? What type of error are you getting?

The other possibility is that excel only allows a certain stack height when it comes to function calls. I would recommend a 10-deep nesting of if statements.

_________________
John Adams wrote:
In my many years I have come to a conclusion that one useless man is a shame, two is a law firm, and three or more is a congress.


Top
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next

Board index » Help Help » Technical Support


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
It is currently Thu Feb 12, 2026 1:37 am