# Posts by hgus393

Hi all and a Happy New Year!!

I have a question for those who are online. I am trying to add comments in a selection of cells and where there is a value then the comment should show the formula value of the cell ie if the formula in cell A1 is = 9 + 10 then the comment should show this. This I have got to work, but if I have a comment already the macro fails and I have tried to get round this but I am not clever enough :(. Can anyone see what I am doing wrong?

Cheers

Robert

• ## Sumif Values Between A Range

Re: Sumif Where The Values Is Between A Certain Range

Thank you all..
Works a charm!

//Robert

• ## Sumif Values Between A Range

Hi all,

Got a question for you formula experts. I have an example, pls see attached. I am trying to find the sum of a number of columns where the critera is between a number of days ie values is greater than 365 but less than 1788 days. The values to sum is the amount for each row where this criteria is met. Does anyone have a clue how to do this? Am i using the right formula?

Robert

• ## Macro: Save New Workbook After Copying Sheets to It

Re: Saving A Workbook From Another Workbook

Robert

• ## Macro: Save New Workbook After Copying Sheets to It

Hi all,

I am moving some sheets into a new workbook and from the new workbook I want to prompt the user to save the workbook where they see fit. For some reason I cannot seem to save the new workbook only the old with the below code. Does anyone have a clue what I am doing wrong?

Robert

• ## Handle #N/A! In VLOOKUP Macro

Re: Vlookup Formula Gives Non Applicable Result

Quote from Dave Hawley

Try

Code
``````Sub VlookupMacro()

Range("A2", Range("A65536").End(xlUp)).Offset(0, 2) = _
"=SUM(IF(COUNTIF(Hksaldo!C1,RC[-2]),VLOOKUP(RC[-2],Hksaldo!C1:C6,6,FALSE),0)," _
& "IF(COUNTIF(Likv!C1,RC[-2]),VLOOKUP(RC[-2],Likv!C1:C5,5,FALSE),0))"

End Sub``````

I am in awe, seriously, I thought I had a clue but...I WAS WRONG :(.

Thank you very very much

Robert

• ## Handle #N/A! In VLOOKUP Macro

Hi all,

I have a problem that I hope somleone can help me with, I am doing a vlookup accross two sheets where I am adding up the first Vlookup with the second vlookup (ie vlookup sheet 1 + vlookup sheet2) and in one of the sheets the vlookup formula finds a value but in the other sheet it finds nothing. As such when the two formulas are added together it gives a value of #N/A. Since I have made a macro for this it is annoying. The macro is as follows:

Does anyone know how I can get around this. Ie when I have a non applicable value i one of the Vlookup formula the formula should only look at the vlookup with a value?

Robert

• ## Workbook Is Too Large

Re: Workbook Is Too Large

Wigi,

Thank you very much... Why does Excel do that?

//Robert

• ## Workbook Is Too Large

Hello all,
I am having a problem with a workbook, I have copied all cells and pasted Special (Values only). But for some reason the workbook is 38 Meg's. The workbook only contains 6 worksheets with about 60 rows and 32 columns with figures and no formulas. I have tried to find formulas by Goto/Special/Formulas and Excel has found nothing. What shoud I do?

//Robert

• ## Show Percentage Difference Between 2 Columns

Re: Show Percentage Difference Between 2 Columns

Dave,
Thank you thank you thank you for this!! The reason I would like to use a macro is that there are a lot of sheets that need to be processed with the same operation and to speed up my work I deemed a macro to be the best option

Robert

• ## Show Percentage Difference Between 2 Columns

Re: Creating A Column With The Difference Between Two Columns

Thanx Face2face,

This will most probably do the stuff, as for being senior... Senior is not always better :o)

Robert

• ## Show Percentage Difference Between 2 Columns

Re: Creating A Column With The Difference Between Two Columns

Aaaah so sorry...
Robert

• ## Show Percentage Difference Between 2 Columns

Hi all,
I have a spreadsheet which has a number of columns populated with a day number and below each day number there are some numbers. What I would like to do is to compare the values for Day1 with Day2, Day 2 with Day 3 etc. Is there a smart way to do this using VBA? I am enclosing an example to show what I would like the macro to do.

Robert

• ## Protecting Macro From Viewing

Re: Protecting Macro From Viewing

Ok, Found out how to do it...I did the right things but I did not exit Excel and enter it again!

//Robert

• ## Protecting Macro From Viewing

Hello,

I have tried to password protect my VBA project but I cannot seem to get it to work. How can I protect my VBA project?

//Robert

• ## Posting Values

Re: Posting Values

Quote from royUK

The example to me is no use, you say you use VBA, but there is none included! You don't say whether your calculator is a UserForm or a worksheet!

Right, the calculator is in a worksheet. I enter values and then I press a button associated with the macro that does the calculations and the calculator does its calculations. The reason I do not include the VBA code is that the project is kind of large so including some part would not be of any help and including everything would just be too much. I am not sure but perhaps an worksheet event might be possible to "record" these old values?

//Robert

• ## Posting Values

Hello,

To start with, sorry for the title, it is a bit general. I have an excel calculator that I use daily (mostly written in VBA). I change some of the values to get a new result. Is it possible to post the values of the results in a column so that I can see what the old values are? For security reasons I cannot disclose the calculator but I guess I can post an example of how I would like it to work.

Thanxs

Robert

• ## Naming A Cell The Same As The Sheets Name

Re: Naming A Cell The Same As The Sheets Name

Hi ya,

I must have had a meltdown I sussed it out it should be asy as:

Code
``ActiveCell = ActiveSheet.Name``

//Robert

• ## Naming A Cell The Same As The Sheets Name

Hello!

I have tried to create a macro that names a number of rows in a cloumn (varies from each sheet in the workbook) and I can not seem to get my head around this problem. Does anyone have a clue of how to do this?

• ## Expanding The Number Of Previous Open Spreadsheets

Re: Expanding The Number Of Previous Open Spreadsheets

Great! Works a charm
Thx

Robert