Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
hakkabuff
 
Posts: n/a
Default trying to add a complicated mess to my worksheet... :)

hi, I'm not really familiar with Excel (came with my PC) but I thought it
could help me with some minor issues. What I'm trying to do is to make a cell
display a specific number that can change if a value of another cell is
modified.
for example if a cell contains the number "13" the other one should display
"+1" and if the "13" should change to "18" the "+1" should change to "+4", I
tried using the IF function but I'm not familiar with Basic so I couldn't do
what I wanted. The range of numbers I wanted are [2 & 3 = -4, 4 & 5 = -3, 6 &
7 = -2, 8 & 9 = -1, 10 & 11 = 0, 12 & 13 = +1, 14 & 15 = +2, 16 & 17 = +3, 18
& 19 = +4, 20 & 21 = +5, and so on], any help on this matter would be very
much appriciated.
  #2   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

You could create a table that looks like

2 -4
4 -3
6 -2
8 -1
10 0
12 +1
14 +2
16 +3
18 +4
20 +5

call it MyTable (select it band do insertnamedefine and type the name or
type it in the namebox)
then use a formula like

=IF(A1<2,"",VLOOKUP(A1,MyTable,2))

or hardcoded


=IF(A1<2,"",VLOOKUP(A1,{2,"-4";4,"-3";6,"-2";8,"-1";10,"0";12,"1";14,"+2";16,"+3";18,"+4";20,"+5"}, 2))

note tyhat I am using text representations of the numbers -4 - +5
you could use numeric values and use a custom format like

+General;-General;0

--
Regards,

Peo Sjoblom


"hakkabuff" wrote in message
...
hi, I'm not really familiar with Excel (came with my PC) but I thought it
could help me with some minor issues. What I'm trying to do is to make a
cell
display a specific number that can change if a value of another cell is
modified.
for example if a cell contains the number "13" the other one should
display
"+1" and if the "13" should change to "18" the "+1" should change to "+4",
I
tried using the IF function but I'm not familiar with Basic so I couldn't
do
what I wanted. The range of numbers I wanted are [2 & 3 = -4, 4 & 5 = -3,
6 &
7 = -2, 8 & 9 = -1, 10 & 11 = 0, 12 & 13 = +1, 14 & 15 = +2, 16 & 17 = +3,
18
& 19 = +4, 20 & 21 = +5, and so on], any help on this matter would be very
much appriciated.



  #3   Report Post  
Duke Carey
 
Posts: n/a
Default

Assume the cell that contains the number 13 is cell A1, then put this formula
in the cell you want to change:

=-4+INT((A1-2)/2)



"hakkabuff" wrote:

hi, I'm not really familiar with Excel (came with my PC) but I thought it
could help me with some minor issues. What I'm trying to do is to make a cell
display a specific number that can change if a value of another cell is
modified.
for example if a cell contains the number "13" the other one should display
"+1" and if the "13" should change to "18" the "+1" should change to "+4", I
tried using the IF function but I'm not familiar with Basic so I couldn't do
what I wanted. The range of numbers I wanted are [2 & 3 = -4, 4 & 5 = -3, 6 &
7 = -2, 8 & 9 = -1, 10 & 11 = 0, 12 & 13 = +1, 14 & 15 = +2, 16 & 17 = +3, 18
& 19 = +4, 20 & 21 = +5, and so on], any help on this matter would be very
much appriciated.

  #4   Report Post  
hakkabuff
 
Posts: n/a
Default

what I'm really trying to do is, I have 2 cells A3 and C3 that I type a
number into and a third that adds the previous 2 cells together, example; I
type -2 in A3 and 16 in C3 and I have a =SUM(A3;C3) in cell D3 that displays
the final number, wich would in this case be 14, now if you've played D20 rpg
you should see what I'm trying to do, in cell E3 I'm trying to display a
bonus that relates to the sum in cell D3, so if D3 is 14 or 15 then E3 should
display +2 but if it's any other number it should display the bonus relevant
to that number, let's say if it changed from 14 to 37 it should display +13
and if the number is 8 or 9 then it should be -1.... it really is a
complicated mess.... :s

"hakkabuff" wrote:

hi, I'm not really familiar with Excel (came with my PC) but I thought it
could help me with some minor issues. What I'm trying to do is to make a cell
display a specific number that can change if a value of another cell is
modified.
for example if a cell contains the number "13" the other one should display
"+1" and if the "13" should change to "18" the "+1" should change to "+4", I
tried using the IF function but I'm not familiar with Basic so I couldn't do
what I wanted. The range of numbers I wanted are [2 & 3 = -4, 4 & 5 = -3, 6 &
7 = -2, 8 & 9 = -1, 10 & 11 = 0, 12 & 13 = +1, 14 & 15 = +2, 16 & 17 = +3, 18
& 19 = +4, 20 & 21 = +5, and so on], any help on this matter would be very
much appriciated.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Search/Match between 2 x separate Worksheets and populate result in third worksheet Alan Bartley Excel Discussion (Misc queries) 1 April 11th 05 05:21 AM
Copy from worksheet to another x times Union70 Excel Discussion (Misc queries) 0 March 7th 05 09:03 PM
Weekly Transaction Processing Ralph Howarth Excel Worksheet Functions 4 January 19th 05 05:37 AM
Indirect reference from one worksheet to another Bill Sturdevant Excel Worksheet Functions 2 December 17th 04 01:23 PM
Reference Data in Moved Worksheet tommcbrny Setting up and Configuration of Excel 1 December 1st 04 06:49 PM


All times are GMT +1. The time now is 02:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"