I am facing a problem with a macro. Here we have 4 sheet , say sheet1 
sheet2 sheet3.(data)
sheet(output sheet) ..PLEASE TO REFER TO THE ATTACHED XLS

 Target is a common variable and first column in all the sheets.

The macro which I have created asks me to first manually enter the Target 
and any of its 3 value in sheet 4.Once entered ,it will check if the value 
and target entered is valid from sheet 1 ,if yes it will take the cell 
address of the value we have entered from sheet 1 and  return the value 
from sheet2 and sheet3 at the same cell address .

E.g
I entered [In the yellow highlighted column] [Sheet 4]

Target1
1 (value)

Now it went to sheet 1 and checked if target1 is present in column if yes,1 
is present or not if yes,it will take the cell address of 1 which is B1,so 
on hitting the button it will give me the value from sheet2 and sheet3 at 
b1 cell address which is 24 and 14.

*Till this condition MACRO is working.*

Now the thing is what if the value we entered is not present for example in 
sheet1 I entered target1 value as 2,which is not found .So what I want 
is,it should find the two values between which  2 will lie ,for example 
here it will lie between 1 and 5 which is cell address B1 AND C1

So now hitting the button for corresponding value,
In sheet2 it should give me mean for values at B1 AND c1 form sheet2 data 
and In sheet3 also it should give me mean for values at B1 AND c1 from 
sheet3 data

[So basically number which is not found should search for <  and > that 
value i.e range between it will lie ,then fetch cell address for that 2 
 range and same cell address in sheet2 and sheet 3,return the mean for two 
values]

I am new to macro ,so please if anyone can help

*MACRO NAME IN EXCEL: Getaddress*


*Thanks in advance*

On Saturday, 4 August 2012 23:58:51 UTC+5:30, Ayush Jain wrote:
>
> Dear members,
>  
> I am happy to share that this forum is available at www.discussexcel.com 
> as a website and you dont need to write the big URL of google groups. 
> This has been done to make the group easily accessible and approachable. 
> Feel free to share about group to your colleagues, friends and anyone who 
> uses excel.
>  
> The existing link (Google groups) will always be available to access this 
> forum.
>  
> My website having excel and macros content will now be available @ 
> www.blog.discussexcel.com.
>  
> Thanks for your active participation in the group. Feel free to write back 
> if you have any feedback
>
> Best regards,
> Ayush Jain
> Group Manager
> Microsoft MVP
>

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at https://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/d/optout.

Attachment: sample_macro.xlsm
Description: application/vnd.ms-excel.sheet.macroenabled.12

Reply via email to