I often find myself needing to do several query and replace operations in a row because, for example I want to change all occurences of 23 to 24 in a line, then 24 to 25 in the next line, and so on (usually because i write an expression in a line which I yank multiple times in subsequent lines and need to slightly modify)...

A macro with C-x q or a regular doing multiple query replace doesn't seem powerful enough in situations like these..is there something more general/flexible to handle variable replaces or variable macro variations like this that I can look into? I belive I had once come across an example on the web where lisp expressions were introduced into certain commands to be more powerful but I can't remember this or where I read about it..

Yeah, sounds like you're looking for elisp expression in search/replace which is described on that blog post. Another very useful thing to try is a combination of keyboard macros and elisp: make a macro that writes an expression and then evaluates it -- very useful for counters and such.
–
Eli BarzilayApr 30 '12 at 21:22

As well as neat uses of existing commands, such as the one shown by ataylor, keyboard macros can be used to perform almost arbitrarily-complex and dynamic behaviours.

Of particular note, C-uM-: will insert into the current buffer the result of any elisp form you enter -- a form which can, of course, be constructed as part of the macro -- so even when no command exists for a particular operation, you are unlikely to be prevented from using macros to achieve your goals.

(And of course if elisp isn't the answer, C-uM-! and C-uM-| give you easy access to incorporating shell command output as well.)

Naturally there are cases where a more targeted solution is available and a macro is more trouble than it is worth (the "search and replace with elisp evaluation" technique linked to in the comments is also incredibly powerful, and often the ideal solution); however keyboard macros also offer an amazing amount of power for incredibly little effort, and can do some things with ease that you might struggle to implement otherwise.

One of my favourite examples is using "old -> new" mapping data in one buffer (in virtually any format imaginable) and using that to perform a search-and-replace on those values in another buffer. The speed with which you can do this kind of thing on an ad-hoc basis with nothing more than simple movement and editing keystrokes is amazing.

The macro editor also makes it easy to tweak your macro if it is not correct the first time, without the need to re-record all the steps.

I read some useful advice one time, which was simply to try to always think about whether you could achieve a task with keyboard macros whenever you encountered something non-trivial. The more you use them, the more you realise different ways in which you can use them, and soon you have a new indispensable tool in your toolbox.

(n.b. this macro assumes that each line in the region contains a value in the sequence.)

Then highlight the remaining lines and use C-xC-kr to update all lines in the region.

You can re-set the macro counter to any desired value with C-xC-kC-c to re-play the macro over another region.

And depending on what your data actually looks like, you could probably simplify that considerably by eliminating the replace-regexp entirely, and instead just moving to where you know the number is, deleting the existing number, and inserting the counter value in its place.