Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default vb for nested if with more than 7 statements

Hi,

I have a nested if with 9 statements, which won't work. I've looked this up
and read i need to convert to code.

Can i please have some help? I know VB for access, but not really done much
with excel.

I have 9 different car types, and each one has a different value.

I just want it to say, after a cell in range B2:B1000 is changed, if that
cell = car type 1, the cell in C2:C2000 changes to the value £100 and if it
changes to car type 2, the cell in column C changes to value £200 etc.....

Thanks,

Kirstie


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default vb for nested if with more than 7 statements

Use a vlookup instead of an if.
Put your list of cars and prices on another sheet. Then, in the cell
that needs to change - type:
=vlookup(
You can then use the fx button to guide you through using vlookups.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default vb for nested if with more than 7 statements

Take a look at this:
http://www.contextures.com/xlFunctions02.html

If you feel brave look he
http://www.mvps.org/dmcritchie/excel/vlookup.htm


Regards,
Ryan---

--
RyGuy


"Stuart Bray" wrote:

Use a vlookup instead of an if.
Put your list of cars and prices on another sheet. Then, in the cell
that needs to change - type:
=vlookup(
You can then use the fx button to guide you through using vlookups.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default vb for nested if with more than 7 statements

Is me, on another computer in another office!

Got it working with Vlookup (great wee function)

Thanks for your help.

Kirstie Adam


"Kirstie Adam" (nospam) wrote in message
...
Hi,

I have a nested if with 9 statements, which won't work. I've looked this
up and read i need to convert to code.

Can i please have some help? I know VB for access, but not really done
much with excel.

I have 9 different car types, and each one has a different value.

I just want it to say, after a cell in range B2:B1000 is changed, if that
cell = car type 1, the cell in C2:C2000 changes to the value £100 and if
it changes to car type 2, the cell in column C changes to value £200
etc.....

Thanks,

Kirstie



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default vb for nested if with more than 7 statements

took me a while to get it, but worked great, thanks
k

"Stuart Bray" wrote in message
...
Use a vlookup instead of an if.
Put your list of cars and prices on another sheet. Then, in the cell
that needs to change - type:
=vlookup(
You can then use the fx button to guide you through using vlookups.



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
Nested If Statements Dave Excel Worksheet Functions 7 May 8th 10 08:43 AM
Too Many Nested IF Statements! Tiziano Excel Worksheet Functions 5 October 3rd 07 02:29 AM
Help with nested if/or statements Nick Excel Discussion (Misc queries) 8 September 14th 07 03:46 PM
Nested IF statements TwoDot Excel Worksheet Functions 4 February 8th 07 12:17 AM
Nested IF statements maacmaac Excel Discussion (Misc queries) 0 January 23rd 06 09:22 PM


All times are GMT +1. The time now is 04:08 AM.

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

About Us

"It's about Microsoft Excel"