Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Event macro to extract data based on value of 2 cells - help

Does anyone know how I can accomplish this?
I have a spreadsheet with many columns in sheet1. In sheet2, I would like
to create a "search box" type of thing, where when a month & year is entered
into a cell, it automatically pulls up certain data from rows that have the
same month and year in sheet1. I say certain data, because I only want the
value of cells C and J to populate in sheet2. To make it more tricky,
there's one more criteria; I also want it to pull up data only from rows in
which cell F reads "Closed".
For example:
If sheet1 has rows 1,3,4,5, and 9 that cell F says "Closed" and it has a
date (cell K) of 1/xx/07, then when sheet2, cell D9 reads "January-07" it
will pull cells C and J from sheet1, rows 1,3,4,5, and 9, and list them in
D10-D14 and E10-E14. If sheet1, rows 11,13,14, and 15 have cell F saying
"Closed" and a date (cell K) of 2/xx/07, then when sheet2, cell D9 reads
"February-07" it will pull cells C and J from sheet1, rows 11,13,14, and 15,
and list them in D10-D13 and E10-E13.
I hope this is clear.
Much thanks to all,
Scott
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Event macro to extract data based on value of 2 cells - help

Just an approach:

1. set up, or have VBA set up, Autofilters on sheet1
2. use VBA to set the criteria1 values on the different columns based on
sheet2 data
3. copy/paste the visible cells of interest
--
Gary's Student


"Scott Marcus" wrote:

Does anyone know how I can accomplish this?
I have a spreadsheet with many columns in sheet1. In sheet2, I would like
to create a "search box" type of thing, where when a month & year is entered
into a cell, it automatically pulls up certain data from rows that have the
same month and year in sheet1. I say certain data, because I only want the
value of cells C and J to populate in sheet2. To make it more tricky,
there's one more criteria; I also want it to pull up data only from rows in
which cell F reads "Closed".
For example:
If sheet1 has rows 1,3,4,5, and 9 that cell F says "Closed" and it has a
date (cell K) of 1/xx/07, then when sheet2, cell D9 reads "January-07" it
will pull cells C and J from sheet1, rows 1,3,4,5, and 9, and list them in
D10-D14 and E10-E14. If sheet1, rows 11,13,14, and 15 have cell F saying
"Closed" and a date (cell K) of 2/xx/07, then when sheet2, cell D9 reads
"February-07" it will pull cells C and J from sheet1, rows 11,13,14, and 15,
and list them in D10-D13 and E10-E13.
I hope this is clear.
Much thanks to all,
Scott

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
How to extract multiple cells based on one value Extrer datos en excel Excel Worksheet Functions 0 April 12th 06 07:17 PM
Clear Cell based on event w/o macro? Paul987 Excel Worksheet Functions 2 October 27th 05 08:44 PM
how to extract data based on date vidhya Excel Worksheet Functions 1 October 18th 05 10:39 AM
How can I extract cells address in OnCahnge event Guy[_4_] Excel Programming 2 September 20th 04 01:06 PM
Run a macro based on event Bret[_3_] Excel Programming 2 May 22nd 04 04:26 PM


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