Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / May 2008

Tip: Looking for answers? Try searching our database.

How to: If G12=A2 then C2...or if G12=A3 then C3 and so on 30 time

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RJJ - 08 May 2008 17:37 GMT
How do I create a formula to have cell show the value in C2 or C3 or C4
etc...based on what is in A2 or A3 or A4 etc... EG: If (G12=A2 then C2)...or
if (G12=A3 then C3)...or if (G12=A4 then C4)  and so on as many as 30 times.
PCLIVE - 08 May 2008 17:43 GMT
One possible way:

=INDIRECT("C"&MATCH(G12,A2:A30,0)+1)

Of course if column A is sorted in Ascending order, then you could use the
Vlookup function.

HTH,
Paul

> How do I create a formula to have cell show the value in C2 or C3 or C4
> etc...based on what is in A2 or A3 or A4 etc... EG: If (G12=A2 then
> C2)...or
> if (G12=A3 then C3)...or if (G12=A4 then C4)  and so on as many as 30
> times.
Mike H - 08 May 2008 17:53 GMT
> Of course if column A is sorted in Ascending order, then you could use the
> Vlookup function.

Only required if using the TRUE switch to look for an approximate match

Mike

> One possible way:
>
[quoted text clipped - 11 lines]
> > if (G12=A3 then C3)...or if (G12=A4 then C4)  and so on as many as 30
> > times.
RJJ - 08 May 2008 19:04 GMT
Still having trouble.

Column A is (A2:A130), ascending, and is my Vendor list and is named
"VendorList" and resides on a worksheet named "Lists".
Column C (worksheet named "Lists") contains the addresses to the Vendors in
column A and are aligned by rows.
G12, on a worksheet named Purchase Orders, is a drop down list and is tied
to "VendorList" on the worksheet named "Lists".
When I make a selection in G12 (worksheet named "Purchase Orders"), I want
G14 (same worksheet) to display the appropriate address.

I am thankful for all your help.

> > Of course if column A is sorted in Ascending order, then you could use the
> > Vlookup function.
[quoted text clipped - 18 lines]
> > > if (G12=A3 then C3)...or if (G12=A4 then C4)  and so on as many as 30
> > > times.
Max - 08 May 2008 20:06 GMT
As responded in your new posting

You could also try index/match ..
In G14:
=IF(G12="","",INDEX(Lists!$C$2:$C$130,MATCH(G12,VendorList,0)))
Signature

Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---

RJJ - 09 May 2008 09:56 GMT
Thank You! This worked perfectly.

> As responded in your new posting
>
> You could also try index/match ..
> In G14:
> =IF(G12="","",INDEX(Lists!$C$2:$C$130,MATCH(G12,VendorList,0)))
Max - 09 May 2008 11:41 GMT
Welcome, glad it helped.
Signature

Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---

> Thank You! This worked perfectly.
Mike H - 08 May 2008 17:46 GMT
Maybe

=VLOOKUP(G12,A1:C30,3,FALSE)

Mike

> How do I create a formula to have cell show the value in C2 or C3 or C4
> etc...based on what is in A2 or A3 or A4 etc... EG: If (G12=A2 then C2)...or
> if (G12=A3 then C3)...or if (G12=A4 then C4)  and so on as many as 30 times.
RJJ - 08 May 2008 18:12 GMT
My G12 in the example is actually a selection from a drop down list. What I
need to do is populate other cells with the appropriate data based on the
selection in this drop down list. The appropriate data is on a different
worksheet aligned per row. Hence A3 and C3, A4 and C4 etc.. I am trying using
VLOOKUP but just can't seem to get it to work.

> Maybe
>
[quoted text clipped - 5 lines]
> > etc...based on what is in A2 or A3 or A4 etc... EG: If (G12=A2 then C2)...or
> > if (G12=A3 then C3)...or if (G12=A4 then C4)  and so on as many as 30 times.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.