Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default if then clause in a cell

I believe i need to write a if then clause.

What i am trying to do is pretty simple in access, but in excel - i've
been at it for days.

Cells A3 to A10 always hold data. In cells D3 to D10 only one cell
holds data, which is a number "1", the other cells are null.


What i am trying to do is:
If cell D4 = 1 then fill cell D12 with the value of cell A4, likewise
if cell D7 = 1 then fill cell D12 with the value of cell A7.

How do i do this and where would i pop the code?

Just new to excel - but making good progress.


---
Message posted from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default if then clause in a cell

In D12:
=INDEX(A3:A10,MATCH(1,D3:D10,0))

"mikewild2000" wrote in message
...
I believe i need to write a if then clause.

What i am trying to do is pretty simple in access, but in excel - i've
been at it for days.

Cells A3 to A10 always hold data. In cells D3 to D10 only one cell
holds data, which is a number "1", the other cells are null.


What i am trying to do is:
If cell D4 = 1 then fill cell D12 with the value of cell A4, likewise
if cell D7 = 1 then fill cell D12 with the value of cell A7.

How do i do this and where would i pop the code?

Just new to excel - but making good progress.


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default if then clause in a cell

Thank you - works a treat!

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default if then clause in a cell

Thanks.

How do i get around D12 giving #N/A error. Can it be changed to a "0"
rather than give the error?

The error occurs when there is no value in D3:D10


---
Message posted from http://www.ExcelForum.com/

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
PERCENTILE with an IF Clause Zeelotes Excel Worksheet Functions 3 April 19th 23 02:11 PM
IF clause for a range of cells Al Excel Worksheet Functions 3 January 18th 10 01:42 PM
IF Clause dpal Excel Worksheet Functions 8 July 19th 07 07:32 PM
"Between" in an IF clause gavin Excel Discussion (Misc queries) 5 May 2nd 05 09:27 PM
Where Clause Errors Pete T[_2_] Excel Programming 0 October 20th 03 04:11 PM


All times are GMT +1. The time now is 03:43 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"