=MATCH(A1,B1:B5,0)
=ADDRESS(A2,2)
=HYPERLINK("#"&A3,"this message text is not required in the macro")
The above, when put into worksheet goes to cell where data matches.
eg A1=eggs. In col b eggs is in cell B4, so clicking on hyperlink takes one to cell b4
So how to make a macro out of this to copy data from any other cell into the matched
cell, eg cell B4 if it is a match. Reference data, obviously, in cell A1 is variable.
The hyperlink code above has a message area but that would not be necessary for a macro.
If it is not possible doing it this way, suggestions please.
Last edited by alfiebaby; 01-18-2010 at 12:02 AM.
Hi alfiebaby
can you run that past me again
regards pike
If the solution helped please donate here to the RSPCA
Sites worth visiting;
J&R Solutions - royUK
AJP Excel Information - Andy Pope
Spreadsheet Toolbox
JBeaucaires Excel Files
VBA for smarties - snb
to add to pike's request:
To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.
If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.
Doing this will ensure you get the result you need!
teylyn
Microsoft MVP - Excel
At Excelforum, you can say "Thank you!" by clicking theicon below the post.
Avoid pie charts with more than two data points. Why? See here (pdf, 559 kb). The only acceptable pie chart is here.
Well, first, here's a ONE-CELL version of your three-cell process so you don't the values in A2 and A3...this formula does it all:
=HYPERLINK("#"&ADDRESS(MATCH(A1,B1:B5,0), 2), "this message text is not required in the macro")
Thanks for this! What a great little trick, I can think of several applications for this already.
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
“None of us is as good as all of us” - Ray Kroc
“Actually, I *am* a rocket scientist.” - JB (little ones count!)
cell a1="eggs on toast" Cell Z1="glue on toast"
col b
french
bread
with
eggs on toast <that is overwritten by contents of cell Z1
is nice
to eat
So previously shown match and address find the match in column B and then copies data
from Z1 to cell where match was found.
cell a1="eggs on toast" Cell Z1="glue on toast"
col b
french
bread
with
eggs on toast <that is overwritten by contents of cell Z1
is nice
to eat
So previously shown match and address find the match in column B and then copies data
from Z1 to cell where match was found.
Can you first of all explain your title? You have posted a formula not code, why do you need a macro?
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel consulting, free examples and tutorials visit Excel Consulting-Excel VBA
Check out the free Excel Toolbar
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
Code Tags: Make your code easier for us to read
Okay, dunno the terminology as yet, only started writing a program a few months ago.
need macro so that i can copy data from a set range to any location in the spread sheet
after it has found where the data is.
a1=eggs (the reference data)
Find row eggs is in copy data from B1:Z1 starting at row and coll where eggs was found. eg (R20C4)
the next search and replace (or update of data in the row) may be dogs and in completely different row and so on eg (R40,C2). The constant is B1:Z1 (as an example)
The ability to do this with a macro opens up all sorts of time saving code writing possibilities.
I think that many would find this extremely useful code/formula
Last edited by alfiebaby; 01-22-2010 at 02:25 AM.
To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.
If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.
Doing this will ensure you get the result you need!
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel consulting, free examples and tutorials visit Excel Consulting-Excel VBA
Check out the free Excel Toolbar
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
Code Tags: Make your code easier for us to read
hyperlink.xlsm
Have included file. Should I repost the whole thing again? Really would like to get
a solution to this ASAP.
Tanks in anticipation
Do not repost,but you haven't added a file. Check it is not too big for attaching. If it is remove unnecessary formatting and/or zip it
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel consulting, free examples and tutorials visit Excel Consulting-Excel VBA
Check out the free Excel Toolbar
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
Code Tags: Make your code easier for us to read
Not sure if this is what you mean
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel consulting, free examples and tutorials visit Excel Consulting-Excel VBA
Check out the free Excel Toolbar
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
Code Tags: Make your code easier for us to read
Hi Roy, looked at what I sent and scratched my head trying to figure out what I meant also!
I will study the code u sent regardless, as it will give me an insight.
However, I have simplified the problem and you should have no trouble this time understanding it.
Thanks for your efforts.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks