|
-
May 10th, 2005, 09:25 AM
#1
Thread Starter
Lively Member
Copying adjacent cell to formula cell
Hi,
I have a seach criteria in one sheet, that looks at thousands of cells in another sheet.
Formula =IF(COUNTIF(Sheet1!$C$2:$N$6200,E15),"Found","Not Found")
Depending on the outcome of the formula, I would like to copy all of those cells ADJACENT to the cell containing the formula whos outcome is 'Found'
Anyone get what I mean?
Im here until I get good at this,.....the more help I get, the less silly questions you'll get! Thanks 
-
May 10th, 2005, 09:52 AM
#2
Re: Copying adjacent cell to formula cell
vlookup function (in excel) read up on it
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
-
May 10th, 2005, 11:37 AM
#3
Thread Starter
Lively Member
Re: Copying adjacent cell to formula cell
 Originally Posted by Ecniv
vlookup function (in excel) read up on it 
Thats not what I am looking for. I want a Macro!
Im here until I get good at this,.....the more help I get, the less silly questions you'll get! Thanks 
-
May 10th, 2005, 05:24 PM
#4
Addicted Member
Re: Copying adjacent cell to formula cell
 Originally Posted by Firestart
I would like to copy all of those cells ADJACENT to the cell containing the formula whos outcome is 'Found'
Anyone get what I mean? 
Copy them where? you're not explaining this right I think.
-
May 12th, 2005, 06:58 AM
#5
Thread Starter
Lively Member
Re: Copying adjacent cell to formula cell
Copy them elsewhere on the worksheet.
Heres how it goes. I have a sheet (1) filled with loads of alpha numberic combinations. On another sheet (2), I have combinations that I was to find in sheet 1.
At present, on sheet 2 I have the formula
=IF(COUNTIF(Sheet1!$C$2:$N$6200,E5),"Found","Not Found")
which is in a box next to the alphanumerics on sheet2.
I actually want to highlight the alphanumeric on sheet1 and two other cells to the left of that alphanumeric figure.
Any ideas?
Im here until I get good at this,.....the more help I get, the less silly questions you'll get! Thanks 
-
May 13th, 2005, 05:15 AM
#6
Re: Copying adjacent cell to formula cell
I just pointed that function out as it is part of Excel and works v quickly. Compared to parsing via code.
If you want to use code, then you'll need to loop through a range to match the first sheet, then copy the contents of adjacent cells to the other sheet, then move on the next row and begin the check again.
What code do you have at the moment?
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
-
May 13th, 2005, 09:03 AM
#7
Thread Starter
Lively Member
Re: Copying adjacent cell to formula cell
Zilch, zero, nada, nothin,......
Im here until I get good at this,.....the more help I get, the less silly questions you'll get! Thanks 
-
May 17th, 2005, 03:32 AM
#8
Re: Copying adjacent cell to formula cell
So how do you want the people on the forum to help you if you have no code?
Can you code a loop to go through:
1) the selected range
2) the cells to be checked against (main list of data)
?
If you can code a loop to return the values in the search list (or was it just one row?), then use a similar loop on the main list to do the comparison (perhaps holding the search value in a string?). You should then have enough code to get the cells of the matching line and put them into the search forms rows...
Try doing some code and posting up what doesn't work.
You may want to lookup:
.range
.cells
.sheets - variable of worksheet
.workbooks - variable of workbook
if statement
.value or .formular1c1
.copy
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|